io.sockets: change protocol-port to handle ``f`` on all platforms.
parent
47b96f6891
commit
0a2fef0775
|
@ -171,3 +171,4 @@ os unix? [
|
|||
[ ] [ f 0 <inet6> <datagram> dispose ] unit-test
|
||||
|
||||
[ 80 ] [ "http" protocol-port ] unit-test
|
||||
[ f ] [ f protocol-port ] unit-test
|
||||
|
|
|
@ -465,7 +465,7 @@ M: invalid-local-address summary
|
|||
] dip with-variable ; inline
|
||||
|
||||
: protocol-port ( protocol -- port )
|
||||
f getservbyname [ port>> htons ] [ f ] if* ;
|
||||
[ f getservbyname [ port>> htons ] [ f ] if* ] [ f ] if* ;
|
||||
|
||||
{
|
||||
{ [ os unix? ] [ "io.sockets.unix" require ] }
|
||||
|
|
Loading…
Reference in New Issue