From patchwork Wed Sep 19 04:48:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Li Wang X-Patchwork-Id: 971433 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42FS6p0w8fz9sBx for ; Wed, 19 Sep 2018 14:48:31 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9D16F3E7815 for ; Wed, 19 Sep 2018 06:48:27 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) by picard.linux.it (Postfix) with ESMTP id B7E873E6046 for ; Wed, 19 Sep 2018 06:48:24 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 346D21000223 for ; Wed, 19 Sep 2018 06:48:22 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 431C981F0D; Wed, 19 Sep 2018 04:48:20 +0000 (UTC) Received: from dhcp-12-173.nay.redhat.com (dhcp-12-173.nay.redhat.com [10.66.12.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8308600C9; Wed, 19 Sep 2018 04:48:18 +0000 (UTC) From: Li Wang To: ltp@lists.linux.it Date: Wed, 19 Sep 2018 12:48:13 +0800 Message-Id: <20180919044813.22875-1-liwang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 19 Sep 2018 04:48:20 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.99.2 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH] statx: fix compile errors with glibc<2.28 X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" glibc 2.28 has shipped with a wrapper for the statx() system call. Currently the build is broken against it, because sys/stat.h suddenly declares all the same types that lapi/stat.h does. Fix it by taking the sys/stat.h ones if glibc>=2.28. include/lapi/stat.h:26:8: error: redefinition of ‘struct statx_timestamp’ include/lapi/stat.h:73:8: error: redefinition of ‘struct statx’ --- include/lapi/stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lapi/stat.h b/include/lapi/stat.h index 979e42d..7ba8618 100644 --- a/include/lapi/stat.h +++ b/include/lapi/stat.h @@ -20,7 +20,7 @@ * * __reserved is held in case we need a yet finer resolution. */ -#if defined(HAVE_STRUCT_STATX_TIMESTAMP) +#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28) #include #else struct statx_timestamp { @@ -66,7 +66,7 @@ struct statx_timestamp { * will have values installed for compatibility purposes so that stat() and * co. can be emulated in userspace. */ -#if defined(HAVE_STRUCT_STATX) +#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28) #include #else struct statx {