Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4537910ybl; Mon, 26 Aug 2019 11:55:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8xxw337uwyB6HiVenXwOOeUzzk+82He4McnsJbxzL5k/Nu07MTBN2AD+vUZrU6e/tCIRZ X-Received: by 2002:a17:902:724a:: with SMTP id c10mr4869168pll.163.1566845706765; Mon, 26 Aug 2019 11:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566845706; cv=none; d=google.com; s=arc-20160816; b=aFDtFWjw7Gdhj/LlSGij5KDDMdkDWztye9/e+jXkOs5ZUKatjJHBtOXZ4feEafgHd1 eINI/wl1Ti6hz3KIGsHWZlQBQzKyPqTbIUA0eeOHV8ZG0l39r36bEwvrxQsZwQvMOOZU um/4jYb7mo90lo4c/JLmWBp6RFgck328CwZxC8y3kfZgwAF1W7KuHlWDiDi6sw/EGkOj X6a+wq6ObBcPQbh9jtqrHpCsPLz/cUx5jUOXa78YgCjX3kkl6wNKzzNYzUG2iHP9S/K1 eF05xAd5aDGU6cHqwiXcNaT5dAusBsYFHlaVoqbukcXlkLyaYRfiyYJxB4UFJ3z7XiAq pOkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=QJ3X7i5GT513OhNYoMI0KhYEClalnTgMMKsOo8FOO20=; b=mAHgygSaNys2h7hGQXk82a8vK8BJDhSz5n+JAvRMlmdFuIIAhyS8py08/voxto8lRP Bu1qusCxf3b+PeINKH/iGe05bWI/xPHVbrrIxKUACUWVH6u9ZpPaiHT74uxrhT2sI521 ud02ZvGQl8T/CKvvMpgmquXPe6iF05GuR6siOoj5a1aLeKHvW4rmKDyvUOtlo4Pgkp4X oALOWmmuzqJ++ejkSzaHAUvBVHFNqW58RhAwJJuAgLUqLrGxFoYTNI3zqYBzH3TzCuiK AZ+U240An3kUi5j5tFlCdVDV3YJtEwjeHI4q4/AQaCwwHqw/uxlh1Bl+Vyduw61dn+Qj kj1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si316286pjv.81.2019.08.26.11.54.51; Mon, 26 Aug 2019 11:55:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731995AbfHZSDF (ORCPT + 99 others); Mon, 26 Aug 2019 14:03:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39857 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731879AbfHZSDF (ORCPT ); Mon, 26 Aug 2019 14:03:05 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5830D10C030C; Mon, 26 Aug 2019 18:03:05 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-116-35.phx2.redhat.com [10.3.116.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0F46196AE; Mon, 26 Aug 2019 18:03:04 +0000 (UTC) Subject: Re: [PATCH 1/3] mount: fix compilation if __GLIBC__ is not defined To: Patrick Steinhardt , linux-nfs@vger.kernel.org References: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> From: Steve Dickson Message-ID: <8a22b4ac-ada6-83b1-361a-62b74f957878@RedHat.com> Date: Mon, 26 Aug 2019 14:03:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Mon, 26 Aug 2019 18:03:05 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 8/26/19 3:48 AM, Patrick Steinhardt wrote: > As glibc versions before v2.24 couldn't safely include , > commit 8af595b7 (mount: support compiling with old glibc, 2017-07-26) > introduced some preprocessor checks to special-case such old versions. > While there is a check whether __GLIBC__ is defined at all, it only > applies to the first comparison `__GLIBC__ < 2`, but doesn't apply to > the second check due to operator precedence. Thus the preprocessor may > use an undefined value and thus generate an error if __GLIBC__ is not > defined. > > Fix the issue by wrapping the version check in braces. > > Signed-off-by: Patrick Steinhardt Commited.... steved. > --- > utils/mount/network.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/mount/network.c b/utils/mount/network.c > index e166a823..6ac913d9 100644 > --- a/utils/mount/network.c > +++ b/utils/mount/network.c > @@ -39,7 +39,7 @@ > #include > #include > #include > -#if defined(__GLIBC__) && (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24) > +#if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 24)) > /* Cannot safely include linux/in6.h in old glibc, so hardcode the needed values */ > # define IPV6_PREFER_SRC_PUBLIC 2 > # define IPV6_ADDR_PREFERENCES 72 >