summaryrefslogtreecommitdiffstats
path: root/plugins/imudp/imudp.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/imudp/imudp.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/imudp/imudp.c')
-rw-r--r--plugins/imudp/imudp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 56cdab28..a5002591 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -453,13 +453,16 @@ rsRetVal rcvMainLoop(thrdInfo_t *pThrd)
CHKmalloc(udpEPollEvt = calloc(udpLstnSocks[0], sizeof(struct epoll_event)));
-# if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1)
- DBGPRINTF("imudp uses epoll_create1()\n");
- efd = epoll_create1(EPOLL_CLOEXEC);
-# else
+#if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1)
+ DBGPRINTF("imudp uses epoll_create1()\n");
+ efd = epoll_create1(EPOLL_CLOEXEC);
+ if(efd < 0 && errno == ENOSYS)
+#endif
+ {
DBGPRINTF("imudp uses epoll_create()\n");
efd = epoll_create(NUM_EPOLL_EVENTS);
-# endif
+ }
+
if(efd < 0) {
DBGPRINTF("epoll_create1() could not create fd\n");
ABORT_FINALIZE(RS_RET_IO_ERROR);