changeset 19002:f3e6256d3762

lib: Fixed io_loop_extract_notify_fd() to compile with kqueue.
author Timo Sirainen <tss@iki.fi>
date Tue, 25 Aug 2015 01:07:04 +0300
parents acfe208a656d
children a98267f8a6e6
files src/lib/ioloop-notify-kqueue.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/ioloop-notify-kqueue.c	Mon Aug 24 18:06:42 2015 +0300
+++ b/src/lib/ioloop-notify-kqueue.c	Tue Aug 25 01:07:04 2015 +0300
@@ -207,15 +207,12 @@
 	if (ctx->kq == -1)
 		return -1;
 
-	new_kq = inotify_init();
-	if (new_kq == -1) {
-		if (errno != EMFILE)
-			i_error("inotify_init() failed: %m");
-		else
-			ioloop_inotify_user_limit_exceeded();
+	new_kq = kqueue();
+	if (new_kq < 0) {
+		i_error("kqueue(notify) failed: %m");
 		return -1;
 	}
-	for (io = ctx->fd_ctx.notifies; io != NULL; io = io->next)
+	for (io = ctx->notifies; io != NULL; io = io->next)
 		io->fd = -1;
 	if (ctx->event_io != NULL)
 		io_remove(&ctx->event_io);