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 /plugins/imptcp | |
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.
Diffstat (limited to 'plugins/imptcp')
-rw-r--r-- | plugins/imptcp/imptcp.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); } |