diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | plugins/imptcp/imptcp.c | 9 |
2 files changed, 12 insertions, 1 deletions
@@ -1,5 +1,9 @@ --------------------------------------------------------------------------- Version 5.6.1 [V5-BETA] (rgerhards), 2010-??-?? +- permitted imptcp to work on systems which support epoll(), but not + epoll_create(). + Bug: http://bugzilla.adiscon.com/show_bug.cgi?id=204 + Thanks to Nicholas Brink for reporting this problem. - bugfix: segfault when an *empty* template was used Bug: http://bugzilla.adiscon.com/show_bug.cgi?id=206 Thanks to David Hill for alerting us. diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index 9b24dbc2..6b14a80e 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -1039,7 +1039,14 @@ CODESTARTwillRun ABORT_FINALIZE(RS_RET_NO_RUN); } - if((epollfd = epoll_create1(EPOLL_CLOEXEC)) < 0) { +# if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1) + DBGPRINTF("imptcp uses epoll_create1()\n"); + epollfd = epoll_create1(EPOLL_CLOEXEC); +# else + DBGPRINTF("imptcp uses epoll_create()\n"); + epollfd = epoll_create(NUM_EPOLL_EVENTS); +# endif + if(epollfd < 0) { errmsg.LogError(0, RS_RET_EPOLL_CR_FAILED, "error: epoll_create() failed"); ABORT_FINALIZE(RS_RET_NO_RUN); } |