diff src/event/modules/ngx_eventport_module.c @ 332:2eea67ed0bc2 NGINX_0_5_36

nginx 0.5.36 *) Bugfix: the "sub_filter" directive might set text to change into output. *) Bugfix: a segmentation fault occurred in worker process, if empty stub block was used second time in SSI. *) Bugfix: the "proxy_store" and "fastcgi_store" directives did not check a response length. *) Bugfix: nginx issued the bogus error message "SSL_shutdown() failed (SSL: )"; bug appeared in 0.5.35. *) Bugfix: in HTTPS mode requests might fail with the "bad write retry" error; bug appeared in 0.5.35. *) Bugfix: the "fastcgi_catch_stderr" directive did return error code; now it returns 502 code, that can be rerouted to a next server using the "fastcgi_next_upstream invalid_header" directive. *) Bugfix: a segmentation fault occurred in master process if the "fastcgi_catch_stderr" directive was used; bug appeared in 0.5.32. Thanks to Manlio Perillo.
author Igor Sysoev <http://sysoev.ru>
date Sun, 04 May 2008 00:00:00 +0400
parents f70f2f565fe0
children
line wrap: on
line diff
--- a/src/event/modules/ngx_eventport_module.c
+++ b/src/event/modules/ngx_eventport_module.c
@@ -40,11 +40,15 @@ typedef struct  port_notify {
     void       *portnfy_user;   /* user defined */
 } port_notify_t;
 
+#if (__FreeBSD_version < 700005)
+
 typedef struct itimerspec {     /* definition per POSIX.4 */
     struct timespec it_interval;/* timer period */
     struct timespec it_value;   /* timer expiration */
 } itimerspec_t;
 
+#endif
+
 int port_create(void)
 {
     return -1;
@@ -106,7 +110,7 @@ static char *ngx_eventport_init_conf(ngx
 static int            ep = -1;
 static port_event_t  *event_list;
 static ngx_uint_t     nevents;
-static timer_t        event_timer = -1;
+static timer_t        event_timer = (timer_t) -1;
 
 static ngx_str_t      eventport_name = ngx_string("eventport");
 
@@ -237,13 +241,13 @@ ngx_eventport_init(ngx_cycle_t *cycle, n
 static void
 ngx_eventport_done(ngx_cycle_t *cycle)
 {
-    if (event_timer != -1) {
+    if (event_timer != (timer_t) -1) {
         if (timer_delete(event_timer) == -1) {
             ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
                           "timer_delete() failed");
         }
 
-        event_timer = -1;
+        event_timer = (timer_t) -1;
     }
 
     if (close(ep) == -1) {