Klaus Demo nginx / 6e8bc2b
fix building --test-build-rtsig and --test-build-eventport on FreeBSD 7 Igor Sysoev 14 years ago
2 changed file(s) with 4 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
3838 int portnfy_port; /* bind request(s) to port */
3939 void *portnfy_user; /* user defined */
4040 } 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;
4641
4742 int port_create(void)
4843 {
105100 static int ep = -1;
106101 static port_event_t *event_list;
107102 static ngx_uint_t nevents;
108 static timer_t event_timer = -1;
103 static timer_t event_timer = (timer_t) -1;
109104
110105 static ngx_str_t eventport_name = ngx_string("eventport");
111106
236231 static void
237232 ngx_eventport_done(ngx_cycle_t *cycle)
238233 {
239 if (event_timer != -1) {
234 if (event_timer != (timer_t) -1) {
240235 if (timer_delete(event_timer) == -1) {
241236 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
242237 "timer_delete() failed");
243238 }
244239
245 event_timer = -1;
240 event_timer = (timer_t) -1;
246241 }
247242
248243 if (close(ep) == -1) {
1111 #if (NGX_TEST_BUILD_RTSIG)
1212
1313 #define F_SETSIG 10
14 #define SIGRTMIN 33
15 #define si_fd __spare__[0]
14 #define si_fd _reason.__spare__.__spare2__[0]
1615 #define KERN_RTSIGNR 30
1716 #define KERN_RTSIGMAX 31
1817