summaryrefslogtreecommitdiffstats
path: root/plugins/imptcp/imptcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-14 09:38:32 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-14 09:38:32 +0100
commit85358a2df39f662d36f735b77be932f7995f3e75 (patch)
tree3ad898540666d4e89565e7af380f00d32fe32f9d /plugins/imptcp/imptcp.c
parent3cf002b8ad6f4126dc9401bed8916e7d30a75579 (diff)
parent33366f2f1e271f47edeed75f69d9885171e61ea0 (diff)
downloadrsyslog-85358a2df39f662d36f735b77be932f7995f3e75.tar.gz
rsyslog-85358a2df39f662d36f735b77be932f7995f3e75.tar.xz
rsyslog-85358a2df39f662d36f735b77be932f7995f3e75.zip
Merge branch 'v5-beta' into v5-devel
Diffstat (limited to 'plugins/imptcp/imptcp.c')
-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 3197564e..e8cffbb0 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);