[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD |
Date: |
Fri, 26 Feb 2016 15:25:41 +0530 |
From: Matthew Fortune <address@hidden>
sys/eventfd.h was being guarded only by a check for linux but does
not exist on older distributions like CentOS 5. Move the include
into the code that uses it and add an appropriate guard.
Signed-off-by: Matthew Fortune <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>
---
migration/postcopy-ram.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index 254c629..fbd0064 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -52,14 +52,14 @@ struct PostcopyDiscardState {
#if defined(__linux__)
#include <poll.h>
-#include <sys/eventfd.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <asm/types.h> /* for __u64 */
#endif
-#if defined(__linux__) && defined(__NR_userfaultfd)
+#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
+#include <sys/eventfd.h>
#include <linux/userfaultfd.h>
static bool ufd_version_check(int ufd)
--
2.5.0
- [Qemu-devel] [PULL 0/6] migration pull, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD,
Amit Shah <=
- [Qemu-devel] [PULL 4/6] migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 5/6] MAINTAINERS: Add docs/migration.txt to the "Migration" section, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 3/6] migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 6/6] migration/vmstate: document VMStateFlags, Amit Shah, 2016/02/26
- Re: [Qemu-devel] [PULL 0/6] migration pull, Peter Maydell, 2016/02/26