Hi,

I've recently tried building qemu with a sysroot that has support
for epoll_create but not epoll_create1.

New code introduced in the following commit uses epoll_create1 but
guards it using CONFIG_EPOLL rather than CONFIG_EPOLL_CREATE1.

Is there any reason for this or can the guard be changed to
use the latter config test?

Thanks,
Matthew

commit fbe3fc5cb3cd9f9064e98c549684e821c353fe41
Author: Fam Zheng <f...@redhat.com>
Date:   Fri Oct 30 12:06:29 2015 +0800

    aio: Introduce aio-epoll.c

...
@@ -305,4 +478,13 @@ bool aio_poll(AioContext *ctx, bool blocking)

 void aio_context_setup(AioContext *ctx, Error **errp)
 {
+#ifdef CONFIG_EPOLL
+    assert(!ctx->epollfd);
+    ctx->epollfd = epoll_create1(EPOLL_CLOEXEC);
+    if (ctx->epollfd == -1) {
+        ctx->epoll_available = false;
+    } else {
+        ctx->epoll_available = true;
+    }
+#endif
 }

Reply via email to