diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-11-05 11:02:14 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-11-05 11:02:14 +0100 |
commit | cb04fc3972ef983b9dd6a550e275639e73502527 (patch) | |
tree | 47c15ba3094aa3ce5b820faf3cf21458fc61bb13 | |
parent | 71b8b60b220945aa0c2b541bf144182e2bb6e032 (diff) | |
download | rsyslog-cb04fc3972ef983b9dd6a550e275639e73502527.tar.gz rsyslog-cb04fc3972ef983b9dd6a550e275639e73502527.tar.xz rsyslog-cb04fc3972ef983b9dd6a550e275639e73502527.zip |
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.
-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); } |