summaryrefslogtreecommitdiffstats
path: root/plugins/imudp/imudp.c
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/imudp/imudp.c
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/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 efff2529..4a9df0c1 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);