From patchwork Mon Aug 26 07:48:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 11114207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29BD31813 for ; Mon, 26 Aug 2019 07:49:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0692A2080C for ; Mon, 26 Aug 2019 07:49:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="sb9uXFe/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="WEng3x6q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727563AbfHZHtI (ORCPT ); Mon, 26 Aug 2019 03:49:08 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:54917 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727674AbfHZHtI (ORCPT ); Mon, 26 Aug 2019 03:49:08 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 89037377 for ; Mon, 26 Aug 2019 03:49:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 26 Aug 2019 03:49:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=Ngx/N2sgJZBewYkvtYJmlECxAF AHU1SdApns+TaMaTY=; b=sb9uXFe/uAJjBAZHJhgtus72tfGyIb3iRfxB/eSRh4 D8U7YykxljcsSuUrga6CHaueh6ggNKMfH8DUXgv7CAVNFTO1m8cH34fsAM9dvRbs OZspchJyKb6E+r63zqbKd6BNJDYyGQsrrm+lbzglqY8C2bb6x3Xtd9UFg7JxyseX 3hLOGsSetICY8YDMqIDZr/khDDeLWTPb57iriviz/x17yVafZaKWEpiyks8ZqpcI pm6gsmpqiJ1Y66wPQenOxl0iE0nvPvk+RDRFRfnNauwZNc5N2/3eGHImbkTfaIYW r6gpns36eYU1F1MjAw2KrzRKEvuMIVL6XCLmfnye5yHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Ngx/N2sgJZBewYkvt YJmlECxAFAHU1SdApns+TaMaTY=; b=WEng3x6qxs+mxNGK82YstO0qimFQsotVg h5Dmng+RpVvG3s+XII5LSSj8WXVJM+5cPRrM9iOyHGkoBb5TLvbOg+5jFrT3DABu HoYEcb2yqrQKrF4OXLI8qnpIXlmU26AO5JS0BbLR6LdyDmE3k6Kn/YG8IkFX8Oxi lmMWNyZ0AwisNcUR4BaZVZK0Vf83QtO2BnFGbw5hmc/gh1y/mnQGAAPjBegR2ZkE xbqQKTaBoq24iJOJLnWwV/7/q1QJC6J7zO2iZaG3UJxRIgp3rZXhGoVz05gInm0p kuXF/+nzIrXfY3PPNYyG0K5lpdl1qIC65QgKUnYYVyYF5BUX8/FlA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudehfedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhk shdrihhmqeenucfkphepjeekrdehhedrvdefrddutdeknecurfgrrhgrmhepmhgrihhlfh hrohhmpehpshesphhkshdrihhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from NSJAIL (x4e37176c.dyn.telefonica.de [78.55.23.108]) by mail.messagingengine.com (Postfix) with ESMTPA id 09294D6005E for ; Mon, 26 Aug 2019 03:49:04 -0400 (EDT) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id db4080a9 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 26 Aug 2019 07:49:01 +0000 (UTC) From: Patrick Steinhardt To: linux-nfs@vger.kernel.org Cc: Patrick Steinhardt Subject: [PATCH 1/3] mount: fix compilation if __GLIBC__ is not defined Date: Mon, 26 Aug 2019 09:48:50 +0200 Message-Id: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 --- 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 From patchwork Mon Aug 26 07:48:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 11114205 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F26ED14DE for ; Mon, 26 Aug 2019 07:49:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EEC42080C for ; Mon, 26 Aug 2019 07:49:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="4TOjsmhG"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bmLn8wRL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730103AbfHZHtI (ORCPT ); Mon, 26 Aug 2019 03:49:08 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:42307 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727563AbfHZHtH (ORCPT ); Mon, 26 Aug 2019 03:49:07 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8FCAB38E for ; Mon, 26 Aug 2019 03:49:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 26 Aug 2019 03:49:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=lqLvFz7httVB3 363B7u+xSWugEcT9YQPU8nl/ICvCe8=; b=4TOjsmhGZlzPLYY13hsNpoTivsNRG 8MfP1Fw08ul+h+3NfjJqj6A8LbOuDtBGFJGj75OAPegsoZpqSRURYyw1nnNu95G6 yfi4a0P3u9Dcn+Dy+3JBNkTaJhqIHtv55Pkgn1cLlQRQ8oVXQkfTh57IWgW6sO46 b2XZqsbWrl5MgWm++UPFB7PT9K+decbsuhTZ9JuhMj7vG0Mtxx8i0BaqWpFkBPHb JVxq2wWRIzt6TexWTsblvDyqlhwEHr/eomvWNqutNZLRZDDq4uZ/5Z7HPeTzyChb AU0rKJci8oLLJ1zdqXhzFmTDjJ4TQ125Nh+nP98KpJRJykbeUtH/LGcLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=lqLvFz7httVB3363B7u+xSWugEcT9YQPU8nl/ICvCe8=; b=bmLn8wRL WZ6vPbO8e30W4wpwFrem8U8qLEWkDMfA9BqzOaDSeq1kcIVorsjXcaDBIkqXVK+b 7vsXMXLFzuUTFJO+WTN0AQHQVtR+ipFJXUOJaacZG5cdGo2DZiVcDBhpJYm/G/mf h6CFHJTgz79WFFmJSO7NzxHxSSdz5zAumIjeimQMSDk3ZM91gcvo+GE115lsy532 ZFM87l9g+VeZYHses3wdfIxKsDJGbMQRN7br3spUCp7b/79ebRC3yleCEOwAikDR tSX4d4le5nkeaKfddjWeD4lI1sbyokyPmek1pSqKUCTu7i9Xv3VDPEZHLPBc/2P2 4KR5NSSsuyu+Bw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudehfedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshes phhkshdrihhmqeenucfkphepjeekrdehhedrvdefrddutdeknecurfgrrhgrmhepmhgrih hlfhhrohhmpehpshesphhkshdrihhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from NSJAIL (x4e37176c.dyn.telefonica.de [78.55.23.108]) by mail.messagingengine.com (Postfix) with ESMTPA id 9BE69D60062 for ; Mon, 26 Aug 2019 03:49:05 -0400 (EDT) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id 7f6f5b3d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 26 Aug 2019 07:49:01 +0000 (UTC) From: Patrick Steinhardt To: linux-nfs@vger.kernel.org Cc: Patrick Steinhardt Subject: [PATCH 2/3] nfsdcld: add missing include for PATH_MAX Date: Mon, 26 Aug 2019 09:48:51 +0200 Message-Id: <15b474e6fa7aee12e64e4376f7716a232e40100a.1566805721.git.ps@pks.im> X-Mailer: git-send-email 2.23.0 In-Reply-To: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> References: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org While glibc transitively includes and thus has PATH_MAX available, other libc implementations may not have the transitive include and thus miss the definition. Add an explicit include of to fix compilation with musl libc. Signed-off-by: Patrick Steinhardt --- utils/nfsdcld/legacy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/nfsdcld/legacy.c b/utils/nfsdcld/legacy.c index f0ca3168..07f477ab 100644 --- a/utils/nfsdcld/legacy.c +++ b/utils/nfsdcld/legacy.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "cld.h" #include "sqlite.h" #include "xlog.h" From patchwork Mon Aug 26 07:48:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 11114209 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 558EC1395 for ; Mon, 26 Aug 2019 07:49:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 329B02080C for ; Mon, 26 Aug 2019 07:49:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="KDwgnMwP"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="P1If7wrf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727674AbfHZHtI (ORCPT ); Mon, 26 Aug 2019 03:49:08 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:41295 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730069AbfHZHtI (ORCPT ); Mon, 26 Aug 2019 03:49:08 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 35074371 for ; Mon, 26 Aug 2019 03:49:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 26 Aug 2019 03:49:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=yxN275zZzqZNJ Ze4onyoq9326x4TC0jCdVT7QZYrB4k=; b=KDwgnMwPWoZ1/UbTqByGoMdEiDveF u//g8NkGIIqOftdNMerk9DA1+cbi1pbFE64kUE0fJGzOocdfPGhH/enhrwS0ZBex kyK4IRgbn63Dm851VmIx8blHEmJBkRN0Ve85bB9nV28HZ0xW3UPd3ISlMhMyE0lX kwHNnIC0eySI+WjOCUUDm5UASmpfb0J1k7rR4TMji+DbXRmP3N38pCSjd1RXKZqD mBihkFH38zaKIRvIxkEi68nMgkk/J1Zhksu0I6kY1GhsYJDwaoHx5tGK7BC+/oj0 OMGZnW7xaTjCB0RVh4joazjF6fcsab4TlRip4yiQhJFRWoaqI2hO8GiNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=yxN275zZzqZNJZe4onyoq9326x4TC0jCdVT7QZYrB4k=; b=P1If7wrf 0GZ/jD3igleoCb8WBiRZwn7zrbvbLRhKNhp7c9TYJeFZxye8KOQdZ7wSV70lVDQd DxU53BCer0xFvWML+5daxdzCMfjA3m8x//Z3hWZ9Rp2LTNHtCyACFdOAGB4qbpVe LpHrHAq0Cl2IUG59PKEHyoi9Z9tBb5FhCgAvUvM0nK8lYcCMSm6jljfcXSnLOOyS fejP+pTydy9J7bjGoUhw1LqyxtghXQvv03kB72O2gzwOXINSh/iuGTBcP0PN11ix kW560tkGJm+XsAWmpfj/+1MiIiBxiJ5OTr5dctu+VunGvMCCkgsnpSIfzHTw0Kyv EXEyS/oIIkEDfw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudehfedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshes phhkshdrihhmqeenucfkphepjeekrdehhedrvdefrddutdeknecurfgrrhgrmhepmhgrih hlfhhrohhmpehpshesphhkshdrihhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from NSJAIL (x4e37176c.dyn.telefonica.de [78.55.23.108]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A2D0D6005B for ; Mon, 26 Aug 2019 03:49:06 -0400 (EDT) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id 50c852a7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 26 Aug 2019 07:49:01 +0000 (UTC) From: Patrick Steinhardt To: linux-nfs@vger.kernel.org Cc: Patrick Steinhardt Subject: [PATCH 3/3] tests: add missing include for strerror(3P) Date: Mon, 26 Aug 2019 09:48:52 +0200 Message-Id: <7e2258fd221466a2974dcf7f0643c65168b429f8.1566805721.git.ps@pks.im> X-Mailer: git-send-email 2.23.0 In-Reply-To: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> References: <6de0089348765e60bcdf59ef5813d7bb631c967f.1566805721.git.ps@pks.im> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org The function strerror(3P) is declared in , but it is not included in "statdb_dump.c". Include it to fix compile errors. Signed-off-by: Patrick Steinhardt --- tests/statdb_dump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/statdb_dump.c b/tests/statdb_dump.c index 92d63f29..3ac12bff 100644 --- a/tests/statdb_dump.c +++ b/tests/statdb_dump.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#include #include #include #include