Porting fixes.

diff --git a/server/named_pipe.c b/server/named_pipe.c
index f2323cc..32fae99 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -32,7 +32,9 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <time.h>
 #include <unistd.h>