You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.5 KiB

  1. --- a/configure.in
  2. +++ b/configure.in
  3. @@ -494,6 +494,7 @@ limits.h \
  4. locale.h \
  5. monetary.h \
  6. netdb.h \
  7. +poll.h \
  8. pwd.h \
  9. resolv.h \
  10. signal.h \
  11. --- a/main/fastcgi.c
  12. +++ b/main/fastcgi.c
  13. @@ -76,7 +76,9 @@ static int is_impersonate = 0;
  14. # include <netdb.h>
  15. # include <signal.h>
  16. -# if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
  17. +# if defined(HAVE_POLL_H) && defined(HAVE_POLL)
  18. +# include <poll.h>
  19. +# elif defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
  20. # include <sys/poll.h>
  21. # endif
  22. # if defined(HAVE_SYS_SELECT_H)
  23. @@ -1427,7 +1429,7 @@ int fcgi_accept_request(fcgi_request *req)
  24. break;
  25. #else
  26. if (req->fd >= 0) {
  27. -#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
  28. +#if defined(HAVE_POLL)
  29. struct pollfd fds;
  30. int ret;
  31. --- a/main/network.c
  32. +++ b/main/network.c
  33. @@ -51,7 +51,9 @@
  34. #ifdef HAVE_SYS_SELECT_H
  35. #include <sys/select.h>
  36. #endif
  37. -#if HAVE_SYS_POLL_H
  38. +#if HAVE_POLL_H
  39. +#include <poll.h>
  40. +#elif HAVE_SYS_POLL_H
  41. #include <sys/poll.h>
  42. #endif
  43. --- a/main/php_network.h
  44. +++ b/main/php_network.h
  45. @@ -120,8 +120,12 @@ typedef int php_socket_t;
  46. /* uncomment this to debug poll(2) emulation on systems that have poll(2) */
  47. /* #define PHP_USE_POLL_2_EMULATION 1 */
  48. -#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
  49. -# include <poll.h>
  50. +#if defined(HAVE_POLL)
  51. +# if defined(HAVE_POLL_H)
  52. +# include <poll.h>
  53. +# elif defined(HAVE_SYS_POLL_H)
  54. +# include <sys/poll.h>
  55. +# endif
  56. typedef struct pollfd php_pollfd;
  57. #else
  58. typedef struct _php_pollfd {