From patchwork Fri Feb 26 15:17:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 8438401 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 12CB69F52D for ; Fri, 26 Feb 2016 15:25:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76FCF203B1 for ; Fri, 26 Feb 2016 15:25:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C26BF203B0 for ; Fri, 26 Feb 2016 15:25:56 +0000 (UTC) Received: from localhost ([::1]:50476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZKHD-0007Ob-QG for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Feb 2016 10:25:55 -0500 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 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id A1CA76DDA7; Fri, 26 Feb 2016 15:17:47 +0000 (UTC) Received: from localhost (ovpn-113-204.phx2.redhat.com [10.3.113.204]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1QFHjYo023182; Fri, 26 Feb 2016 10:17:46 -0500 From: Amit Shah To: Peter Maydell Date: Fri, 26 Feb 2016 20:47:31 +0530 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 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 Subject: [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)