r1871, r1940 merge:
fix building --test-build-rtsig and --test-build-eventport on FreeBSD 7
This commit is contained in:
parent
64763c5e44
commit
c8795dae87
|
@ -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_cycle_t *cycle, void *conf);
|
|||
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, ngx_msec_t timer)
|
|||
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) {
|
||||
|
|
|
@ -11,9 +11,14 @@
|
|||
|
||||
#if (NGX_TEST_BUILD_RTSIG)
|
||||
|
||||
#define F_SETSIG 10
|
||||
#ifdef SIGRTMIN
|
||||
#define si_fd _reason.__spare__.__spare2__[0]
|
||||
#else
|
||||
#define SIGRTMIN 33
|
||||
#define si_fd __spare__[0]
|
||||
#endif
|
||||
|
||||
#define F_SETSIG 10
|
||||
#define KERN_RTSIGNR 30
|
||||
#define KERN_RTSIGMAX 31
|
||||
|
||||
|
|
Loading…
Reference in New Issue