From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYXou-0003Gu-TV for qemu-devel@nongnu.org; Wed, 24 Feb 2016 06:41:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYXor-0002eM-Jl for qemu-devel@nongnu.org; Wed, 24 Feb 2016 06:41:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYXor-0002eH-Dl for qemu-devel@nongnu.org; Wed, 24 Feb 2016 06:41:25 -0500 From: Juan Quintela In-Reply-To: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org> (Matthew Fortune's message of "Tue, 23 Feb 2016 16:09:15 +0000") References: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org> Date: Wed, 24 Feb 2016 12:41:21 +0100 Message-ID: <87vb5el4im.fsf@emacs.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matthew Fortune Cc: Amit Shah , "qemu-devel@nongnu.org" Matthew Fortune wrote: > 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 > --- > migration/postcopy-ram.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Juan Quintela Thanks. > 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)