From patchwork Wed Mar 15 07:01:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 9624953 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 260B960424 for ; Wed, 15 Mar 2017 07:05:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17DCE28138 for ; Wed, 15 Mar 2017 07:05:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C981285DC; Wed, 15 Mar 2017 07:05:31 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4943328138 for ; Wed, 15 Mar 2017 07:05:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1co2we-0002LQ-Nr; Wed, 15 Mar 2017 07:02:04 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1co2wd-0002Kb-Pu for xen-devel@lists.xen.org; Wed, 15 Mar 2017 07:02:04 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id CF/AB-25093-BE6E8C85; Wed, 15 Mar 2017 07:02:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRWlGSWpSXmKPExsUSuHLSQt2Xz05 EGFyfqGmx5ONiFgdGj6O7fzMFMEaxZuYl5VcksGZsPPWWqeAKT8XOpk0sDYwfuboYuThYBB4z SSxZ8Zi1i5GTQ0IgV+Ll4WfsXYwcQLaIxJP/aSA1QgInmSRmf2sFqxESSJM48qyVHcRmE1CS2 HvwOCOILSIgLXHt82Uwm1kgS2L34gNgtrCAtUR75zXmLkZ2oGWqEutdQaK8AsYS8zatZ4fYKi +xaNMMlgmMPAsYGVYxqhenFpWlFuma6iUVZaZnlOQmZuboGhqY6eWmFhcnpqfmJCYV6yXn525 iBHqcAQh2ME6/7H+IUZKDSUmU9/q5ExFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHgfPgXKCRal pqdWpGXmAEMPJi3BwaMkwtsPkuYtLkjMLc5Mh0idYlSUEudlAQaskABIIqM0D64NFu6XGGWlh HkZgQ4R4ilILcrNLEGVf8UozsGoJMx7E2Q8T2ZeCdz0V0CLmYAWJ/48ArK4JBEhJdXAuCH0Rq Dodsc4laTsF9rHg7xbWwS8Be61NahH7NGLrn0x9cOahQxfvof35nU+MJyed+nrKvaSglM1R2o zPONPPr6mOc+je0WY24PtC2+8XT6jIC6ghlnqyPPcr2+kLCs1Hj2xaL6TZeBiLz/JZ8k/qw+a Tnt6T2m9XCrbqR9f/9mGO2Rvt+ZhJZbijERDLeai4kQAtaxOTXICAAA= X-Env-Sender: olaf@aepfle.de X-Msg-Ref: server-3.tower-21.messagelabs.com!1489561321!58855331!1 X-Originating-IP: [81.169.146.161] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: QmFkIElQOiA4MS4xNjkuMTQ2LjE2MSA9PiA1ODk3MjY=\n,sa_preprocessor: QmFkIElQOiA4MS4xNjkuMTQ2LjE2MSA9PiA1ODk3MjY=\n X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26863 invoked from network); 15 Mar 2017 07:02:01 -0000 Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.161) by server-3.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Mar 2017 07:02:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1489561321; l=1635; s=domk; d=aepfle.de; h=Date:Subject:Cc:To:From; bh=K8b8vLr9exOACBddOnmH0IJgliGYPtAfP9KEhuQTlxs=; b=XI2xD0jt0yDTS9skR/jewGG8r+kOaQqLLXSL1+Xl65QdHI3rWU3PayX81nx2EGjKTG 9DZNyG1OP4otN09PYkedM/gCTi3jiQxS98S+8M82eVLNsjknhH6KvLX0Kz+H7tAhayay BkSmW38gReocPkI2MXdPaZLc47E+So3Z1LTpM= X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWi/zfN1cLnAYQz4mzReNqcqYjs45lr6r5IAFue3FKoNvgDX08ETLA== X-RZG-CLASS-ID: mo00 Received: from probook ([2001:a61:3430:6aff:fcc2:e7f0:45be:5248]) by smtp.strato.de (RZmta 40.1 AUTH) with ESMTPSA id k0af37t2F7206Ok (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 15 Mar 2017 08:02:00 +0100 (CET) Received: by probook (Postfix, from userid 1000) id 291F050BA5; Wed, 15 Mar 2017 08:01:59 +0100 (CET) From: Olaf Hering To: xen-devel@lists.xen.org Date: Wed, 15 Mar 2017 07:01:34 +0000 Message-Id: <20170315070134.22864-1-olaf@aepfle.de> X-Mailer: git-send-email 2.12.0 Cc: Wei Liu , Olaf Hering , Ian Jackson Subject: [Xen-devel] [PATCH v2] tools: include sys/sysmacros.h on Linux X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Due to a bug in the glibc headers the macros makedev(), major() and minor() where avaialble by including sys/types.h. This bug was addressed in glibc-2.25 by introducing a warning when these macros are used. Since Xen is build with -Werror this new warning cause a compile error. Use sys/sysmacros.h to define these three macros. blktap2 is already Linux specific. The kernel header which was used to get makedev() does not provided it anymore, and it was wrong to use a kernel header anyway. Signed-off-by: Olaf Hering Acked-by: Wei Liu --- v2: keep include linux/major.h for MISC_MAJOR, move inclusion of sysmacros.h before stat.h tools/blktap2/control/tap-ctl-allocate.c | 1 + tools/libxl/libxl_osdeps.h | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/blktap2/control/tap-ctl-allocate.c b/tools/blktap2/control/tap-ctl-allocate.c index 8a6471e987..187cadcde7 100644 --- a/tools/blktap2/control/tap-ctl-allocate.c +++ b/tools/blktap2/control/tap-ctl-allocate.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/libxl/libxl_osdeps.h b/tools/libxl/libxl_osdeps.h index a40d62066b..de1d24ecae 100644 --- a/tools/libxl/libxl_osdeps.h +++ b/tools/libxl/libxl_osdeps.h @@ -39,6 +39,7 @@ #define SYSFS_PCI_DEV "/sys/bus/pci/devices" #define SYSFS_PCIBACK_DRIVER "/sys/bus/pci/drivers/pciback" #define NETBACK_NIC_NAME "vif%u.%d" +#include #include #include #elif defined(__sun__)