summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2017-04-30 20:28:38 +0100
committerJakub Zelenka <bukka@php.net>2017-04-30 20:28:38 +0100
commit2bce80150fa5ec08f2ebfe20ec2732130fc058af (patch)
treeb2f22735726d36dfc98be423fa89aa3fbc9e821d
parentdccf487b2dcb395fd1e83ba98d8dc54bf7288c16 (diff)
parent9622a3be436a300d45bf77524c2a75e628dca172 (diff)
downloadphp-git-2bce80150fa5ec08f2ebfe20ec2732130fc058af.tar.gz
Merge branch 'PHP-7.1'
-rw-r--r--configure.ac1
-rw-r--r--main/fastcgi.c6
-rw-r--r--main/network.c4
-rw-r--r--main/php_network.h8
4 files changed, 14 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 5c0b50895f..598418fd89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,6 +461,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 cca4342f2a..1e8a8064d7 100644
--- a/main/fastcgi.c
+++ b/main/fastcgi.c
@@ -76,7 +76,9 @@ static int is_impersonate = 0;
# include <netdb.h>
# include <signal.h>
-# if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
+# if defined(HAVE_POLL_H) && defined(HAVE_POLL)
+# include <poll.h>
+# elif defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
# include <sys/poll.h>
# 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 be9a6f198a..eee7d28fea 100644
--- a/main/network.c
+++ b/main/network.c
@@ -48,7 +48,9 @@
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-#if HAVE_SYS_POLL_H
+#if HAVE_POLL_H
+#include <poll.h>
+#elif HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
diff --git a/main/php_network.h b/main/php_network.h
index b78f95400a..5385fe13d4 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 <poll.h>
+#if defined(HAVE_POLL)
+# if defined(HAVE_POLL_H)
+# include <poll.h>
+# elif defined(HAVE_SYS_POLL_H)
+# include <sys/poll.h>
+# endif
typedef struct pollfd php_pollfd;
#else
typedef struct _php_pollfd {