summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/nsdpoll_ptcp.c4
-rw-r--r--runtime/nsdpoll_ptcp.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/runtime/nsdpoll_ptcp.c b/runtime/nsdpoll_ptcp.c
index 85aac04c..51006707 100644
--- a/runtime/nsdpoll_ptcp.c
+++ b/runtime/nsdpoll_ptcp.c
@@ -24,6 +24,8 @@
*/
#include "config.h"
+#ifdef HAVE_EPOLL_CREATE /* this module requires epoll! */
+
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
@@ -280,5 +282,7 @@ BEGINObjClassInit(nsdpoll_ptcp, 1, OBJ_IS_CORE_MODULE) /* class, version */
/* set our own handlers */
ENDObjClassInit(nsdpoll_ptcp)
+#endif /* #ifdef HAVE_EPOLL_CREATE this module requires epoll! */
+
/* vi:set ai:
*/
diff --git a/runtime/nsdpoll_ptcp.h b/runtime/nsdpoll_ptcp.h
index 0708e489..cea2823d 100644
--- a/runtime/nsdpoll_ptcp.h
+++ b/runtime/nsdpoll_ptcp.h
@@ -27,8 +27,6 @@
#include "nsd.h"
#if HAVE_SYS_EPOLL_H
# include <sys/epoll.h>
-#else
- typedef void epoll_event_t;
#endif
typedef nsdpoll_if_t nsdpoll_ptcp_if_t; /* we just *implement* this interface */
/* a helper object to keep track of the epoll event records
@@ -37,7 +35,9 @@ typedef nsdpoll_if_t nsdpoll_ptcp_if_t; /* we just *implement* this interface */
*/
typedef struct nsdpoll_epollevt_lst_s nsdpoll_epollevt_lst_t;
struct nsdpoll_epollevt_lst_s {
+#if HAVE_SYS_EPOLL_H
epoll_event_t event;
+#endif
int id;
void *pUsr;
nsd_ptcp_t *pSock; /* our associated netstream driver data */