summaryrefslogtreecommitdiff
path: root/source4/lib/events
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-02-17 23:11:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:45 -0500
commitc52fb55903fc68dd6e9d13f618277b2c12e17aa6 (patch)
treed71b34db517d01b847a30454536270b3c3d79999 /source4/lib/events
parenta2aa220709eca6dd260d9eeecf918f9bb129d8ed (diff)
downloadsamba-c52fb55903fc68dd6e9d13f618277b2c12e17aa6.tar.gz
samba-c52fb55903fc68dd6e9d13f618277b2c12e17aa6.tar.bz2
samba-c52fb55903fc68dd6e9d13f618277b2c12e17aa6.zip
r5437: Allow Samba4 to be compiled by tcc (www.tinycc.org). It still crashes when linking though.
(This used to be commit 2e1e8db6dc877eb32b51cfc3d9c8f463d14530ec)
Diffstat (limited to 'source4/lib/events')
-rw-r--r--source4/lib/events/events_standard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c
index 96f938c78e..76c8c4768a 100644
--- a/source4/lib/events/events_standard.c
+++ b/source4/lib/events/events_standard.c
@@ -357,8 +357,8 @@ static int std_event_loop_epoll(struct event_context *ev, struct timeval *tvalp)
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
int ret, i;
- const int maxevents = 8;
- struct epoll_event events[maxevents];
+#define MAXEVENTS 8
+ struct epoll_event events[MAXEVENTS];
uint32_t destruction_count = std_ev->destruction_count;
int timeout = -1;
@@ -367,7 +367,7 @@ static int std_event_loop_epoll(struct event_context *ev, struct timeval *tvalp)
timeout = ((tvalp->tv_usec+999) / 1000) + (tvalp->tv_sec*1000);
}
- ret = epoll_wait(std_ev->epoll_fd, events, maxevents, timeout);
+ ret = epoll_wait(std_ev->epoll_fd, events, MAXEVENTS, timeout);
if (ret == -1 && errno != EINTR) {
epoll_fallback_to_select(ev, "epoll_wait() failed");