From: Amit Shah <amit.shah@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Juan Quintela <quintela@redhat.com>,
qemu list <qemu-devel@nongnu.org>,
Matthew Fortune <matthew.fortune@imgtec.com>,
Amit Shah <amit.shah@redhat.com>,
den@openvz.org, richard.weiyang@gmail.com,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
silbe@linux.vnet.ibm.com
Subject: [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD
Date: Fri, 26 Feb 2016 20:47:31 +0530 [thread overview]
Message-ID: <d8b9d7719cf6fb3186ecc817b3c04005eb1a1f01.1456499794.git.amit.shah@redhat.com> (raw)
In-Reply-To: <cover.1456499794.git.amit.shah@redhat.com>
In-Reply-To: <cover.1456499794.git.amit.shah@redhat.com>
From: Matthew Fortune <Matthew.Fortune@imgtec.com>
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 <matthew.fortune@imgtec.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
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
next prev parent reply other threads:[~2016-02-26 15:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 15:17 [Qemu-devel] [PULL v3 0/6] migration pull Amit Shah
2016-02-26 15:17 ` [Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric Amit Shah
2016-02-26 15:17 ` Amit Shah [this message]
2016-02-26 15:17 ` [Qemu-devel] [PULL 3/6] MAINTAINERS: Add docs/migration.txt to the "Migration" section Amit Shah
2016-02-26 15:17 ` [Qemu-devel] [PULL 4/6] migration/vmstate: document VMStateFlags Amit Shah
2016-02-26 15:17 ` [Qemu-devel] [PULL 5/6] migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context Amit Shah
2016-02-26 15:17 ` [Qemu-devel] [PULL 6/6] migration (postcopy): " Amit Shah
2016-02-26 16:01 ` [Qemu-devel] [PULL v3 0/6] migration pull Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2016-02-26 9:55 [Qemu-devel] [PULL " Amit Shah
2016-02-26 9:55 ` [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8b9d7719cf6fb3186ecc817b3c04005eb1a1f01.1456499794.git.amit.shah@redhat.com \
--to=amit.shah@redhat.com \
--cc=den@openvz.org \
--cc=dgilbert@redhat.com \
--cc=matthew.fortune@imgtec.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.weiyang@gmail.com \
--cc=silbe@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).