From: Timo Sirainen Date: Mon, 24 Aug 2015 22:07:04 +0000 (+0300) Subject: lib: Fixed io_loop_extract_notify_fd() to compile with kqueue. X-Git-Tag: 2.2.19.rc1~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a350c75b6e22e6e8f246964924d9a4715d16af08;p=thirdparty%2Fdovecot%2Fcore.git lib: Fixed io_loop_extract_notify_fd() to compile with kqueue. --- diff --git a/src/lib/ioloop-notify-kqueue.c b/src/lib/ioloop-notify-kqueue.c index b61c749c98..5f40578d56 100644 --- a/src/lib/ioloop-notify-kqueue.c +++ b/src/lib/ioloop-notify-kqueue.c @@ -207,15 +207,12 @@ int io_loop_extract_notify_fd(struct ioloop *ioloop) 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);