diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-14 12:49:12 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-14 12:49:12 +0100 |
commit | ef45e0ff714767b58e9069a1db78d92ef370e498 (patch) | |
tree | 248849f1ba7abfda64bf30a9bc97b472f91955be /runtime/nsdpoll_ptcp.c | |
parent | 5c7162879af11255aea4e6f6e1091a69ce14aff3 (diff) | |
parent | da4c90af2592c1c1f7e55d3445df23131b035e27 (diff) | |
download | rsyslog-ef45e0ff714767b58e9069a1db78d92ef370e498.tar.gz rsyslog-ef45e0ff714767b58e9069a1db78d92ef370e498.tar.bz2 rsyslog-ef45e0ff714767b58e9069a1db78d92ef370e498.zip |
Merge branch 'v5-devel'
Conflicts:
tests/diag.sh
Diffstat (limited to 'runtime/nsdpoll_ptcp.c')
-rw-r--r-- | runtime/nsdpoll_ptcp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/nsdpoll_ptcp.c b/runtime/nsdpoll_ptcp.c index 6fd92df1..78203292 100644 --- a/runtime/nsdpoll_ptcp.c +++ b/runtime/nsdpoll_ptcp.c @@ -138,13 +138,16 @@ delEvent(nsdpoll_epollevt_lst_t **ppEvtLst) { /* Standard-Constructor */ BEGINobjConstruct(nsdpoll_ptcp) /* be sure to specify the object type also in END macro! */ -# if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1) - DBGPRINTF("nsdpoll_ptcp uses epoll_create1()\n"); - pThis->efd = epoll_create1(EPOLL_CLOEXEC); -# else +#if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1) + DBGPRINTF("nsdpoll_ptcp uses epoll_create1()\n"); + pThis->efd = epoll_create1(EPOLL_CLOEXEC); + if(pThis->efd < 0 && errno == ENOSYS) +#endif + { DBGPRINTF("nsdpoll_ptcp uses epoll_create()\n"); pThis->efd = epoll_create(100); /* size is ignored in newer kernels, but 100 is not bad... */ -# endif + } + if(pThis->efd < 0) { DBGPRINTF("epoll_create1() could not create fd\n"); ABORT_FINALIZE(RS_RET_IO_ERROR); |