diff options
author | Michael Biebl <biebl@debian.org> | 2011-03-26 19:16:55 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2011-03-26 19:16:55 +0100 |
commit | dea543841bb1f1c46586a68da21d55b44c6bf158 (patch) | |
tree | 46dd88ab15d5da40adae5ca8748f73e079df979a /plugins/imudp | |
parent | a362b3333f84518889cefc1706d4e6adaa92888c (diff) | |
download | rsyslog-dea543841bb1f1c46586a68da21d55b44c6bf158.tar.gz |
Imported Upstream version 5.7.9upstream/5.7.9
Diffstat (limited to 'plugins/imudp')
-rw-r--r-- | plugins/imudp/imudp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 56cdab2..a500259 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); |