summaryrefslogtreecommitdiff
path: root/plugins/imptcp
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-03-26 19:16:55 +0100
committerMichael Biebl <biebl@debian.org>2011-03-26 19:16:55 +0100
commitdea543841bb1f1c46586a68da21d55b44c6bf158 (patch)
tree46dd88ab15d5da40adae5ca8748f73e079df979a /plugins/imptcp
parenta362b3333f84518889cefc1706d4e6adaa92888c (diff)
downloadrsyslog-dea543841bb1f1c46586a68da21d55b44c6bf158.tar.gz
Imported Upstream version 5.7.9upstream/5.7.9
Diffstat (limited to 'plugins/imptcp')
-rw-r--r--plugins/imptcp/imptcp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c
index 3197564..e8cffbb 100644
--- a/plugins/imptcp/imptcp.c
+++ b/plugins/imptcp/imptcp.c
@@ -1047,17 +1047,20 @@ CODESTARTwillRun
ABORT_FINALIZE(RS_RET_NO_RUN);
}
-# if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1)
- DBGPRINTF("imptcp uses epoll_create1()\n");
- epollfd = epoll_create1(EPOLL_CLOEXEC);
-# else
+#if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1)
+ DBGPRINTF("imptcp uses epoll_create1()\n");
+ epollfd = epoll_create1(EPOLL_CLOEXEC);
+ if(epollfd < 0 && errno == ENOSYS)
+#endif
+ {
DBGPRINTF("imptcp uses epoll_create()\n");
/* reading the docs, the number of epoll events passed to
* epoll_create() seems not to be used at all in kernels. So
* we just provide "a" number, happens to be 10.
*/
epollfd = epoll_create(10);
-# endif
+ }
+
if(epollfd < 0) {
errmsg.LogError(0, RS_RET_EPOLL_CR_FAILED, "error: epoll_create() failed");
ABORT_FINALIZE(RS_RET_NO_RUN);