From c52fb55903fc68dd6e9d13f618277b2c12e17aa6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Feb 2005 23:11:26 +0000 Subject: r5437: Allow Samba4 to be compiled by tcc (www.tinycc.org). It still crashes when linking though. (This used to be commit 2e1e8db6dc877eb32b51cfc3d9c8f463d14530ec) --- source4/lib/events/events_standard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/lib') 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"); -- cgit