From patchwork Wed Dec 28 14:53:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher Covington X-Patchwork-Id: 9490395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EED62602A7 for ; Wed, 28 Dec 2016 14:54:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB5EB1FF8F for ; Wed, 28 Dec 2016 14:54:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFB94201BC; Wed, 28 Dec 2016 14:54:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 324D31FF8F for ; Wed, 28 Dec 2016 14:54:11 +0000 (UTC) Received: from localhost ([::1]:59577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMFcH-0005BD-R0 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Dec 2016 09:54:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMFc3-0005B8-NJ for qemu-devel@nongnu.org; Wed, 28 Dec 2016 09:53:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMFc1-0006pN-4A for qemu-devel@nongnu.org; Wed, 28 Dec 2016 09:53:55 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58910) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMFc0-0006pH-P2 for qemu-devel@nongnu.org; Wed, 28 Dec 2016 09:53:53 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 25384613B1; Wed, 28 Dec 2016 14:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1482936831; bh=CqMBze1OP684Ws6UqH+7R7IwSFse1dXdLDXjGXqiaNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CkitQDLGcc+i6mmHaBbFD+XGUplJnPJnCNdz54rqqr/BhoPu1i62b4MLz7Qkvkqk4 eETu4jMXxWv54AlUrv/tVtqP3zn0j7CSL2rFxQt0yCNyoqsvthhjv6Ki3GeK8Rv6ec 59Swyq0nS0oh5b0NKbHhGFBcjRBHT2IxErCFXccg= Received: from rtp-lab-has1.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: cov@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 34C0461295; Wed, 28 Dec 2016 14:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1482936830; bh=CqMBze1OP684Ws6UqH+7R7IwSFse1dXdLDXjGXqiaNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MKA8OKp+Xo/dVIBe6bbas4Z+J8H61mJiM1wa99gwJ3y8o0/srVgw8MoA5fus8jhtk kFdeW2WQAjhEMi0/IDA4+cfX/AXEHgtJKBd3AidccNgI3Y9laERqPENf242TXPEGuE abtTUgBj1SMtc/Mif7riJ45xj+7eYWOf6OM1dC8k= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 34C0461295 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=cov@codeaurora.org From: Christopher Covington To: qemu-devel@nongnu.org Date: Wed, 28 Dec 2016 09:53:44 -0500 Message-Id: <20161228145344.30819-1-cov@codeaurora.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.145.29.96 Subject: [Qemu-devel] [PATCH v2] build: include sys/sysmacros.h for major() and minor() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= , Christopher Covington , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The definition of the major() and minor() macros are moving within glibc to . Include this header to avoid the following sorts of build-stopping messages: qga/commands-posix.c: In function ‘dev_major_minor’: qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. If you did not intend to use a system-defined macro "major", you should undefine it after including . [-Werror] *devmajor = major(st.st_rdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~ qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "minor", include directly. If you did not intend to use a system-defined macro "minor", you should undefine it after including . [-Werror] *devminor = minor(st.st_rdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~ The additional include allows the build to complete on Fedora 26 (Rawhide) with glibc version 2.24.90. Signed-off-by: Christopher Covington --- include/sysemu/os-posix.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index b0a6c0695b..772d58f7ed 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include