]> git.kaiwu.me - nginx.git/commitdiff
Events: fixed test building with devpoll and eventport on Linux.
authorSergey Kandaurov <pluknet@nginx.com>
Mon, 21 Mar 2016 09:36:36 +0000 (12:36 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Mon, 21 Mar 2016 09:36:36 +0000 (12:36 +0300)
Avoid POLLREMOVE and itimerspec redefinition.

src/event/modules/ngx_devpoll_module.c
src/event/modules/ngx_eventport_module.c

index a932185d73bda422fbc3800ada941dfd67b8e315..f985fbdfb474cde05a9bb0420cf2fc1afc458828 100644 (file)
@@ -14,7 +14,9 @@
 
 /* Solaris declarations */
 
+#ifndef POLLREMOVE
 #define POLLREMOVE   0x0800
+#endif
 #define DP_POLL      0xD001
 #define DP_ISPOLLED  0xD002
 
index bacbb05075f081d5eec7933b0286b8eb5d2b0cd9..91845479e3d96e3e161598a74016b7beb656559c 100644 (file)
@@ -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 */