Added check for pwd.h.

diff --git a/configure b/configure
index 1663aec..d5fdb2d 100755
--- a/configure
+++ b/configure
@@ -11160,6 +11160,7 @@
 
 
 
+
 for ac_header in \
 	arpa/inet.h \
 	arpa/nameser.h \
@@ -11186,6 +11187,7 @@
 	netinet/ip.h \
 	netinet/tcp.h \
 	pty.h \
+	pwd.h \
 	resolv.h \
 	sched.h \
 	scsi/sg.h \
diff --git a/configure.ac b/configure.ac
index 8f20a46..35abff4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -907,6 +907,7 @@
 	netinet/ip.h \
 	netinet/tcp.h \
 	pty.h \
+	pwd.h \
 	resolv.h \
 	sched.h \
 	scsi/sg.h \
diff --git a/include/config.h.in b/include/config.h.in
index 52d1616..7bd5d05 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -344,6 +344,9 @@
 /* Define to 1 if you have the <pty.h> header file. */
 #undef HAVE_PTY_H
 
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
 /* Define to 1 if you have the `pwrite' function. */
 #undef HAVE_PWRITE
 
diff --git a/library/config.c b/library/config.c
index 07e1785..80a6894 100644
--- a/library/config.c
+++ b/library/config.c
@@ -22,7 +22,6 @@
 #include "wine/port.h"
 
 #include <errno.h>
-#include <pwd.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
@@ -30,6 +29,10 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
 static const char * const server_config_dir = "/.wine";        /* config dir relative to $HOME */
 static const char * const server_root_prefix = "/tmp/.wine-";  /* prefix for server root dir */
 static const char * const server_dir_prefix = "/server-";      /* prefix for server dir */