io.sockets: change protocol-port to handle ``f`` on all platforms.

db4
John Benediktsson 2014-03-12 07:24:40 -07:00
parent 47b96f6891
commit 0a2fef0775
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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 ] }