diff --git a/configure.in b/configure.in index ef0487fe94d..55969675f75 100644 --- a/configure.in +++ b/configure.in @@ -494,6 +494,7 @@ limits.h \ locale.h \ monetary.h \ netdb.h \ +poll.h \ pwd.h \ resolv.h \ signal.h \ diff --git a/main/fastcgi.c b/main/fastcgi.c index cca4342f2a2..1e8a8064d70 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -76,7 +76,9 @@ static int is_impersonate = 0; # include # include -# if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) +# if defined(HAVE_POLL_H) && defined(HAVE_POLL) +# include +# elif defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) # include # endif # if defined(HAVE_SYS_SELECT_H) @@ -1430,7 +1432,7 @@ int fcgi_accept_request(fcgi_request *req) break; #else if (req->fd >= 0) { -#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) +#if defined(HAVE_POLL) struct pollfd fds; int ret; diff --git a/main/network.c b/main/network.c index d0866708e90..8ce5fa06488 100644 --- a/main/network.c +++ b/main/network.c @@ -51,7 +51,9 @@ #ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_SYS_POLL_H +#if HAVE_POLL_H +#include +#elif HAVE_SYS_POLL_H #include #endif diff --git a/main/php_network.h b/main/php_network.h index b78f95400ac..5385fe13d46 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -122,8 +122,12 @@ typedef int php_socket_t; /* uncomment this to debug poll(2) emulation on systems that have poll(2) */ /* #define PHP_USE_POLL_2_EMULATION 1 */ -#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) -# include +#if defined(HAVE_POLL) +# if defined(HAVE_POLL_H) +# include +# elif defined(HAVE_SYS_POLL_H) +# include +# endif typedef struct pollfd php_pollfd; #else typedef struct _php_pollfd {