diff --git a/devpoll.c b/devpoll.c index c3f389f519..6b46fc3fb8 100644 --- a/devpoll.c +++ b/devpoll.c @@ -27,6 +27,8 @@ #include "event2/event-config.h" #include "evconfig-private.h" +#ifdef _EVENT_HAVE_DEVPOLL + #include #include #ifdef _EVENT_HAVE_SYS_TIME_H @@ -305,3 +307,5 @@ devpoll_dealloc(struct event_base *base) memset(devpollop, 0, sizeof(struct devpollop)); mm_free(devpollop); } + +#endif /* _EVENT_HAVE_DEVPOLL */ diff --git a/epoll.c b/epoll.c index 69d028850b..4c84f56985 100644 --- a/epoll.c +++ b/epoll.c @@ -27,6 +27,8 @@ #include "event2/event-config.h" #include "evconfig-private.h" +#ifdef _EVENT_HAVE_EPOLL + #include #include #include @@ -582,3 +584,5 @@ epoll_dealloc(struct event_base *base) memset(epollop, 0, sizeof(struct epollop)); mm_free(epollop); } + +#endif /* _EVENT_HAVE_EPOLL */ diff --git a/evport.c b/evport.c index 511f8d6894..d95d933d8a 100644 --- a/evport.c +++ b/evport.c @@ -56,6 +56,8 @@ #include "event2/event-config.h" #include "evconfig-private.h" +#ifdef _EVENT_HAVE_EVENT_PORTS + #include #include #include @@ -445,3 +447,5 @@ evport_dealloc(struct event_base *base) mm_free(evpd); } + +#endif /* _EVENT_HAVE_EVENT_PORTS */ diff --git a/kqueue.c b/kqueue.c index fc5d82fa63..b688599c6f 100644 --- a/kqueue.c +++ b/kqueue.c @@ -29,6 +29,8 @@ #include "event2/event-config.h" #include "evconfig-private.h" +#ifdef _EVENT_HAVE_KQUEUE + #include #ifdef _EVENT_HAVE_SYS_TIME_H #include @@ -470,3 +472,5 @@ kq_sig_del(struct event_base *base, int nsignal, short old, short events, void * return (0); } + +#endif /* _EVENT_HAVE_KQUEUE */ diff --git a/poll.c b/poll.c index f48fe59eb6..98b73776d3 100644 --- a/poll.c +++ b/poll.c @@ -29,6 +29,8 @@ #include "event2/event-config.h" #include "evconfig-private.h" +#ifdef _EVENT_HAVE_POLL + #include #ifdef _EVENT_HAVE_SYS_TIME_H #include @@ -332,3 +334,5 @@ poll_dealloc(struct event_base *base) memset(pop, 0, sizeof(struct pollop)); mm_free(pop); } + +#endif /* _EVENT_HAVE_POLL */ diff --git a/select.c b/select.c index 5d284c79b6..f176c848f8 100644 --- a/select.c +++ b/select.c @@ -29,6 +29,8 @@ #include "event2/event-config.h" #include "evconfig-private.h" +#ifdef _EVENT_HAVE_SELECT + #ifdef __APPLE__ /* Apple wants us to define this if we might ever pass more than * FD_SETSIZE bits to select(). */ @@ -338,3 +340,5 @@ select_dealloc(struct event_base *base) select_free_selectop(base->evbase); } + +#endif /* _EVENT_HAVE_SELECT */