Added a check for poll.h.
diff --git a/configure b/configure
index 26e961f..a8ff547 100755
--- a/configure
+++ b/configure
@@ -7261,6 +7261,7 @@
+
for ac_header in \
arpa/inet.h \
arpa/nameser.h \
@@ -7296,6 +7297,7 @@
netinet/tcp.h \
netinet/tcp_fsm.h \
openssl/ssl.h \
+ poll.h \
process.h \
pthread.h \
pwd.h \
diff --git a/configure.ac b/configure.ac
index d9cfbab..b06b65a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,6 +199,7 @@
netinet/tcp.h \
netinet/tcp_fsm.h \
openssl/ssl.h \
+ poll.h \
process.h \
pthread.h \
pwd.h \
diff --git a/dlls/kernel/sync.c b/dlls/kernel/sync.c
index 225162a..7d414b2 100644
--- a/dlls/kernel/sync.c
+++ b/dlls/kernel/sync.c
@@ -29,6 +29,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index adec16a..d22bbba 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -29,6 +29,9 @@
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c
index 0d4cd98..90f928b 100644
--- a/dlls/winmm/wineoss/audio.c
+++ b/dlls/winmm/wineoss/audio.c
@@ -49,6 +49,9 @@
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
diff --git a/dlls/winmm/wineoss/dscapture.c b/dlls/winmm/wineoss/dscapture.c
index b2de9b4..a1c695e 100644
--- a/dlls/winmm/wineoss/dscapture.c
+++ b/dlls/winmm/wineoss/dscapture.c
@@ -36,6 +36,9 @@
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
diff --git a/dlls/winmm/wineoss/dsrender.c b/dlls/winmm/wineoss/dsrender.c
index 4d20656..4b41742 100644
--- a/dlls/winmm/wineoss/dsrender.c
+++ b/dlls/winmm/wineoss/dsrender.c
@@ -39,6 +39,9 @@
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c
index 067979f..fd6b54e 100644
--- a/dlls/winmm/wineoss/midi.c
+++ b/dlls/winmm/wineoss/midi.c
@@ -52,6 +52,9 @@
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c
index 41dda63..2edb58f 100644
--- a/dlls/winsock/socket.c
+++ b/dlls/winsock/socket.c
@@ -104,6 +104,9 @@
# define HAVE_IPX
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
diff --git a/include/config.h.in b/include/config.h.in
index 46e71c0..b26730d 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -419,6 +419,9 @@
/* Define to 1 if the system has the type `pid_t'. */
#undef HAVE_PID_T
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
/* Define to 1 if you have the `popen' function. */
#undef HAVE_POPEN
diff --git a/server/fd.c b/server/fd.c
index ed95a74..0dcaee7 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -30,6 +30,9 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
diff --git a/server/file.c b/server/file.c
index 9ca2c91..3971182 100644
--- a/server/file.c
+++ b/server/file.c
@@ -39,6 +39,9 @@
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include "winerror.h"
#include "windef.h"
diff --git a/server/named_pipe.c b/server/named_pipe.c
index e10f44a..ee1fceb 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -38,6 +38,9 @@
#endif
#include <time.h>
#include <unistd.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include "windef.h"
#include "winbase.h"
diff --git a/server/process.c b/server/process.c
index 7eab25b..c89fa1c 100644
--- a/server/process.c
+++ b/server/process.c
@@ -33,6 +33,9 @@
# include <sys/socket.h>
#endif
#include <unistd.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include "windef.h"
#include "winbase.h"
diff --git a/server/request.c b/server/request.c
index d7602da..4f943d0 100644
--- a/server/request.c
+++ b/server/request.c
@@ -48,6 +48,9 @@
#include <sys/un.h>
#endif
#include <unistd.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include "windef.h"
#include "winbase.h"
diff --git a/server/serial.c b/server/serial.c
index a0d59a9..1ad7461 100644
--- a/server/serial.c
+++ b/server/serial.c
@@ -42,6 +42,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include "winerror.h"
#include "windef.h"
diff --git a/server/signal.c b/server/signal.c
index 0fe7df3..ea1c15b 100644
--- a/server/signal.c
+++ b/server/signal.c
@@ -22,6 +22,9 @@
#include <signal.h>
#include <stdio.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
diff --git a/server/thread.c b/server/thread.c
index a2a232d..059aec4 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -32,6 +32,9 @@
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include "windef.h"
#include "winbase.h"