From 7517ef2a81eab41b8aeda699dc8ed050c01092b6 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Tue, 28 Mar 2006 04:16:14 +0000 Subject: [PATCH] some fixes from openbsd via brad svn:r207 --- event.c | 5 +++-- poll.c | 6 +++--- select.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/event.c b/event.c index 4c8aeed3..82df1bed 100644 --- a/event.c +++ b/event.c @@ -48,6 +48,7 @@ #include #endif #include +#include #include #include @@ -109,8 +110,8 @@ struct event_list signalqueue; struct event_base *current_base = NULL; /* Handle signals - This is a deprecated interface */ -int (*event_sigcb)(void); /* Signal callback when gotsig is set */ -volatile int event_gotsig; /* Set in signal handler */ +int (*event_sigcb)(void); /* Signal callback when gotsig is set */ +volatile sig_atomic_t event_gotsig; /* Set in signal handler */ /* Prototypes */ static void event_queue_insert(struct event_base *, struct event *, int); diff --git a/poll.c b/poll.c index 437b94a2..698bbbf3 100644 --- a/poll.c +++ b/poll.c @@ -75,7 +75,7 @@ int poll_del (void *, struct event *); int poll_recalc (struct event_base *, void *, int); int poll_dispatch (struct event_base *, void *, struct timeval *); -struct eventop pollops = { +const struct eventop pollops = { "poll", poll_init, poll_add, @@ -89,7 +89,7 @@ poll_init(void) { struct pollop *pollop; - /* Disable kqueue when this environment variable is set */ + /* Disable poll when this environment variable is set */ if (getenv("EVENT_NOPOLL")) return (NULL); @@ -182,7 +182,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) return (0); for (i = 0; i < nfds; i++) { - int what = pop->event_set[i].revents; + int what = pop->event_set[i].revents; struct event *r_ev = NULL, *w_ev = NULL; if (!what) continue; diff --git a/select.c b/select.c index 00909b79..f4a3c3c3 100644 --- a/select.c +++ b/select.c @@ -93,7 +93,7 @@ select_init(void) { struct selectop *sop; - /* Disable kqueue when this environment variable is set */ + /* Disable select when this environment variable is set */ if (getenv("EVENT_NOSELECT")) return (NULL); -- 2.40.0