summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-25 15:06:41 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-25 15:06:41 +0100
commite86b0680ef9f3c90172c6b3cb1ad563859da6223 (patch)
tree309c68f818ce4a259772d66783a7f52f2d1f4ad7 /runtime
parentc21d381030a5b6ae3bc20a9cfb84c4c04b0922ff (diff)
downloadrsyslog-e86b0680ef9f3c90172c6b3cb1ad563859da6223.tar.gz
rsyslog-e86b0680ef9f3c90172c6b3cb1ad563859da6223.tar.xz
rsyslog-e86b0680ef9f3c90172c6b3cb1ad563859da6223.zip
solved some platform issues with nsdpoll_ptcp
Diffstat (limited to 'runtime')
-rw-r--r--runtime/nsd_ptcp.c1
-rw-r--r--runtime/nsdpoll_ptcp.c6
-rw-r--r--runtime/nsdpoll_ptcp.h5
3 files changed, 9 insertions, 3 deletions
diff --git a/runtime/nsd_ptcp.c b/runtime/nsd_ptcp.c
index 96881097..744955c7 100644
--- a/runtime/nsd_ptcp.c
+++ b/runtime/nsd_ptcp.c
@@ -48,6 +48,7 @@
#include "netstrms.h"
#include "netstrm.h"
#include "nsdsel_ptcp.h"
+#include "nsdpoll_ptcp.h"
#include "nsd_ptcp.h"
MODULE_TYPE_LIB
diff --git a/runtime/nsdpoll_ptcp.c b/runtime/nsdpoll_ptcp.c
index 445ecc71..85aac04c 100644
--- a/runtime/nsdpoll_ptcp.c
+++ b/runtime/nsdpoll_ptcp.c
@@ -133,11 +133,11 @@ delEvent(nsdpoll_epollevt_lst_t **ppEvtLst) {
*/
BEGINobjConstruct(nsdpoll_ptcp) /* be sure to specify the object type also in END macro! */
# if defined(EPOLL_CLOEXEC) && defined(HAVE_EPOLL_CREATE1)
- DBGPRINTF("imudp uses epoll_create1()\n");
+ DBGPRINTF("nsdpoll_ptcp uses epoll_create1()\n");
pThis->efd = epoll_create1(EPOLL_CLOEXEC);
# else
- DBGPRINTF("imudp uses epoll_create()\n");
- pThis->efd = epoll_create(NUM_EPOLL_EVENTS);
+ 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");
diff --git a/runtime/nsdpoll_ptcp.h b/runtime/nsdpoll_ptcp.h
index ccdb87f0..0708e489 100644
--- a/runtime/nsdpoll_ptcp.h
+++ b/runtime/nsdpoll_ptcp.h
@@ -25,6 +25,11 @@
#define INCLUDED_NSDPOLL_PTCP_H
#include "nsd.h"
+#if HAVE_SYS_EPOLL_H
+# include <sys/epoll.h>
+#else
+ typedef void epoll_event_t;
+#endif
typedef nsdpoll_if_t nsdpoll_ptcp_if_t; /* we just *implement* this interface */
/* a helper object to keep track of the epoll event records
* Note that we need to keep track of that list because we need to