From: Chris Wright <[email protected]>

Fix build when !CONFIG_EVENTFD

 CC    compatfd.o
compatfd.c: In function ‘qemu_eventfd’:
compatfd.c:137: error: ‘ret’ undeclared (first use in this function)
compatfd.c:137: error: (Each undeclared identifier is reported only once
compatfd.c:137: error: for each function it appears in.)
make: *** [compatfd.o] Error 1

Signed-off-by: Chris Wright <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/compatfd.c b/compatfd.c
index e87bb9e..4a00d95 100644
--- a/compatfd.c
+++ b/compatfd.c
@@ -118,9 +118,9 @@ int qemu_signalfd(const sigset_t *mask)
 
 int qemu_eventfd(int *fds)
 {
-#if defined(CONFIG_EVENTFD)
     int ret;
 
+#if defined(CONFIG_EVENTFD)
     ret = syscall(SYS_eventfd, 0);
     if (ret >= 0) {
         fds[0] = ret;
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to