From patchwork Fri Apr 29 17:15:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOhbiBWZXNlbMO9?= X-Patchwork-Id: 8984111 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 7A6859F1D3 for ; Fri, 29 Apr 2016 17:16:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C897E201B4 for ; Fri, 29 Apr 2016 17:16:32 +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 2323E201B9 for ; Fri, 29 Apr 2016 17:16:32 +0000 (UTC) Received: from localhost ([::1]:55585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awC1k-0000OX-9J for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Apr 2016 13:16:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awC1T-00005w-Hz for qemu-devel@nongnu.org; Fri, 29 Apr 2016 13:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awC1H-0000Oh-8o for qemu-devel@nongnu.org; Fri, 29 Apr 2016 13:16:06 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:33314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awC1G-0000GT-2o; Fri, 29 Apr 2016 13:15:59 -0400 Received: by mail-qk0-x241.google.com with SMTP id q184so8535193qkf.0; Fri, 29 Apr 2016 10:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4LNGBwgBSAPJIui/rG+oibbUparMQKPv1pgCMU3myKI=; b=kgjYWJhS0BkV3VyIEGkghaBbwf7ddgsE0JidcDXp0yGEYNXnjGCvbd+tL9tDxlEGz8 sdMLXLLiUm25yOoMNsqh3J6aYmv+cJvI01LXUJAa/JdLHtCnxkUwaWaQwrn4WBUqG3x8 ow452f4OuTISFr/2zUXnDVvkJcuyzbMv7c58LbstiQ/ulFFCv00UWADRpyE7q9FCqpxx QI1qojPWQKXxr3Noga22ZmYZRBiZMCd8Oex7n/N22DUZBTq0RHwVeDdLNK83qfrPNZHT ERUjsI1Z4JWURPpEpjFThhsEVc3TxQcBY3JJAF7DCRaE3IwZ+zB4BeAQFyt/R2uYHA8A 6UPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4LNGBwgBSAPJIui/rG+oibbUparMQKPv1pgCMU3myKI=; b=JxtCC9CvvF0VYO7hbDkrc7WnrxSP/dMkNFFogrQ4k5UwrM2VroSe1XZr3nkC9napNa 4N17tAaHg4vaAJKltc+9t1u9J9yaXa2ZkkChVKDrQLCDkYFeBVf7GFeptagqkwXIUlv2 gLECYHpOtH1w8HKvERbm5ZTWdFfp7RWuNRfK+PzJdsPSwCDoSPqOPIN5vlLVMVBJh7Vz 7yr8rjqsR3Lpyu9WlBe7nmqnU+Ghg6OuBj2MWjbXWS3u8mh1Pn+0zz0lDOTTmPr28cHf sIie4aiPNWJEmnHRploIPzH/F+vsmiY8GAk2aZ+kuXWnA8ZKMxBzRvpPbpM9JubI2c9x dwPg== X-Gm-Message-State: AOPr4FXC5hp2Q8mXOe7BYd76LxtGb492l4ebtXL7unCYqZxJWKXap7OPXmh8FJDLNahnGw== X-Received: by 10.55.186.132 with SMTP id k126mr21003988qkf.176.1461950126659; Fri, 29 Apr 2016 10:15:26 -0700 (PDT) Received: from ulmo.rutgers.edu (lawn-gw.rutgers.edu. [128.6.168.245]) by smtp.gmail.com with ESMTPSA id y129sm4722661qka.33.2016.04.29.10.15.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Apr 2016 10:15:25 -0700 (PDT) From: Jan Vesely To: qemu-devel@nongnu.org Date: Fri, 29 Apr 2016 13:15:23 -0400 Message-Id: <1461950123-5498-1-git-send-email-jano.vesely@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH v2] configure: Check if struct fsxattr is available from linux header 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: qemu-trivial@nongnu.org, Peter Maydell , Markus Armbruster , Stefan Weil Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Fixes build failure with --enable-xfsctl and new linux headers (>=4.5) and older xfsprogs(<4.5): In file included from /usr/include/xfs/xfs.h:38:0, from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:97: /usr/include/xfs/xfs_fs.h:42:8: error: redefinition of ‘struct fsxattr’ struct fsxattr { ^ In file included from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:60:0: /usr/include/linux/fs.h:155:8: note: originally defined here struct fsxattr { v2: Add explanatory comment CC: qemu-trivial@nongnu.org CC: Markus Armbruster CC: Peter Maydell CC: Stefan Weil Signed-off-by: Jan Vesely --- configure | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configure b/configure index ab54f3c..2c3585c 100755 --- a/configure +++ b/configure @@ -4493,6 +4493,21 @@ if test "$fortify_source" != "no"; then fi fi +######################################## +# check if struct fsxattr is available + +have_fsxattr=no +cat > $TMPC << EOF +#include +struct fsxattr foo; +int main(void) { + return 0; +} +EOF +if compile_prog "" "" ; then + have_fsxattr=yes +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5160,6 +5175,12 @@ fi if test "$have_ifaddrs_h" = "yes" ; then echo "HAVE_IFADDRS_H=y" >> $config_host_mak fi + +# xfs headers will try to redefine structs from linux headers +# if this macro is not set +if test "$have_fsxattr" = "yes" ; then + echo "HAVE_FSXATTR=y" >> $config_host_mak +fi if test "$vte" = "yes" ; then echo "CONFIG_VTE=y" >> $config_host_mak echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak