summaryrefslogtreecommitdiffstats
path: root/plugins/imptcp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-14 12:49:12 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-14 12:49:12 +0100
commitef45e0ff714767b58e9069a1db78d92ef370e498 (patch)
tree248849f1ba7abfda64bf30a9bc97b472f91955be /plugins/imptcp
parent5c7162879af11255aea4e6f6e1091a69ce14aff3 (diff)
parentda4c90af2592c1c1f7e55d3445df23131b035e27 (diff)
downloadrsyslog-ef45e0ff714767b58e9069a1db78d92ef370e498.tar.gz
rsyslog-ef45e0ff714767b58e9069a1db78d92ef370e498.tar.xz
rsyslog-ef45e0ff714767b58e9069a1db78d92ef370e498.zip
Merge branch 'v5-devel'
Conflicts: tests/diag.sh
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 ccfe6380..33277148 100644
--- a/plugins/imptcp/imptcp.c
+++ b/plugins/imptcp/imptcp.c
@@ -1175,17 +1175,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);