[nginx] Events: fixed test building with devpoll and eventport on Linux.

Sergey Kandaurov pluknet at nginx.com
Mon Mar 21 09:37:48 UTC 2016


details:   http://hg.nginx.org/nginx/rev/d17f0584006f
branches:  
changeset: 6447:d17f0584006f
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Mon Mar 21 12:36:36 2016 +0300
description:
Events: fixed test building with devpoll and eventport on Linux.

Avoid POLLREMOVE and itimerspec redefinition.

diffstat:

 src/event/modules/ngx_devpoll_module.c   |  2 ++
 src/event/modules/ngx_eventport_module.c |  2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 0ff7eff48c7e -r d17f0584006f src/event/modules/ngx_devpoll_module.c
--- a/src/event/modules/ngx_devpoll_module.c	Fri Mar 18 16:38:08 2016 -0700
+++ b/src/event/modules/ngx_devpoll_module.c	Mon Mar 21 12:36:36 2016 +0300
@@ -14,7 +14,9 @@
 
 /* Solaris declarations */
 
+#ifndef POLLREMOVE
 #define POLLREMOVE   0x0800
+#endif
 #define DP_POLL      0xD001
 #define DP_ISPOLLED  0xD002
 
diff -r 0ff7eff48c7e -r d17f0584006f src/event/modules/ngx_eventport_module.c
--- a/src/event/modules/ngx_eventport_module.c	Fri Mar 18 16:38:08 2016 -0700
+++ b/src/event/modules/ngx_eventport_module.c	Mon Mar 21 12:36:36 2016 +0300
@@ -49,7 +49,7 @@ typedef struct  port_notify {
     void       *portnfy_user;   /* user defined */
 } port_notify_t;
 
-#if (__FreeBSD_version < 700005)
+#if (__FreeBSD__) && (__FreeBSD_version < 700005)
 
 typedef struct itimerspec {     /* definition per POSIX.4 */
     struct timespec it_interval;/* timer period */



More information about the nginx-devel mailing list