From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZK9N-0002bz-2l for qemu-devel@nongnu.org; Fri, 26 Feb 2016 10:17:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZK9M-0004F9-4Z for qemu-devel@nongnu.org; Fri, 26 Feb 2016 10:17:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZK9L-0004F4-VX for qemu-devel@nongnu.org; Fri, 26 Feb 2016 10:17:48 -0500 From: Amit Shah Date: Fri, 26 Feb 2016 20:47:31 +0530 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Juan Quintela , qemu list , Matthew Fortune , Amit Shah , den@openvz.org, richard.weiyang@gmail.com, "Dr. David Alan Gilbert" , silbe@linux.vnet.ibm.com From: Matthew Fortune 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 Reviewed-by: Juan Quintela Message-Id: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org> Signed-off-by: Amit Shah --- 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 -#include #include #include #include #include /* for __u64 */ #endif -#if defined(__linux__) && defined(__NR_userfaultfd) +#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD) +#include #include static bool ufd_version_check(int ufd) -- 2.5.0