fix building --test-build-rtsig and --test-build-eventport on FreeBSD 7
Igor Sysoev
14 years ago
38 | 38 | int portnfy_port; /* bind request(s) to port */ |
39 | 39 | void *portnfy_user; /* user defined */ |
40 | 40 | } port_notify_t; |
41 | ||
42 | typedef struct itimerspec { /* definition per POSIX.4 */ | |
43 | struct timespec it_interval;/* timer period */ | |
44 | struct timespec it_value; /* timer expiration */ | |
45 | } itimerspec_t; | |
46 | 41 | |
47 | 42 | int port_create(void) |
48 | 43 | { |
105 | 100 | static int ep = -1; |
106 | 101 | static port_event_t *event_list; |
107 | 102 | static ngx_uint_t nevents; |
108 | static timer_t event_timer = -1; | |
103 | static timer_t event_timer = (timer_t) -1; | |
109 | 104 | |
110 | 105 | static ngx_str_t eventport_name = ngx_string("eventport"); |
111 | 106 | |
236 | 231 | static void |
237 | 232 | ngx_eventport_done(ngx_cycle_t *cycle) |
238 | 233 | { |
239 | if (event_timer != -1) { | |
234 | if (event_timer != (timer_t) -1) { | |
240 | 235 | if (timer_delete(event_timer) == -1) { |
241 | 236 | ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, |
242 | 237 | "timer_delete() failed"); |
243 | 238 | } |
244 | 239 | |
245 | event_timer = -1; | |
240 | event_timer = (timer_t) -1; | |
246 | 241 | } |
247 | 242 | |
248 | 243 | if (close(ep) == -1) { |