BSD sockets fix-up