Porting fixes.

diff --git a/server/request.c b/server/request.c
index 15c4883..5411313 100644
--- a/server/request.c
+++ b/server/request.c
@@ -24,7 +24,9 @@
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
+#ifdef HAVE_PWD_H
 #include <pwd.h>
+#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -39,8 +41,12 @@
 #ifdef HAVE_SYS_WAIT_H
 # include <sys/wait.h>
 #endif
+#ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
+#endif
+#ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
+#endif
 #include <unistd.h>
 
 #include "windef.h"