X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fio.c;h=dab3043983364e6997effff4055eab9c8a1400a9;hb=925b4de2981b55a279f28368446f0a862c621d5e;hp=9ffdfd6b8320e4ab12439e3273e92d99ceceb8a1;hpb=44bb22d23ec6841457db41732caa6f5f9129b615;p=ngircd-alex.git diff --git a/src/ngircd/io.c b/src/ngircd/io.c index 9ffdfd6b..dab30439 100644 --- a/src/ngircd/io.c +++ b/src/ngircd/io.c @@ -86,6 +86,20 @@ static int io_masterfd; static int io_dispatch_kqueue(struct timeval *tv); static bool io_event_change_kqueue(int, short, const int action); + +#ifndef EV_SET +/* Taken from /usr/include/sys/event.h of FreeBSD 8.1 and required by all + * platforms that have kqueue but lack EV_SET() -- for example FreeBSD 4. */ +#define EV_SET(kevp, a, b, c, d, e, f) do { \ + struct kevent *__kevp__ = (kevp); \ + __kevp__->ident = (a); \ + __kevp__->filter = (b); \ + __kevp__->flags = (c); \ + __kevp__->fflags = (d); \ + __kevp__->data = (e); \ + __kevp__->udata = (f); \ +} while(0) +#endif #endif #ifdef IO_USE_POLL @@ -617,7 +631,7 @@ io_library_init_kqueue(unsigned int eventsize) io_masterfd = kqueue(); Log(LOG_INFO, - "IO subsystem: kqueue (initial maxfd %u, masterfd %d)", + "IO subsystem: kqueue (initial maxfd %u, masterfd %d).", eventsize, io_masterfd); if (io_masterfd >= 0) library_initialized = true;