Get network_linux.c to build under MacOS X
close the socket and return -1 if the socket `connect` call fails
Merge pull request #354 from raybellis/NetOnOSX

Get network_linux.c to build under MacOS X