From patchwork Mon Feb 4 14:31:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 10795787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E8581823 for ; Mon, 4 Feb 2019 14:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C85B2B1DA for ; Mon, 4 Feb 2019 14:30:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A8742B773; Mon, 4 Feb 2019 14:30:42 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 414E22B1DA for ; Mon, 4 Feb 2019 14:30:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728563AbfBDOaj (ORCPT ); Mon, 4 Feb 2019 09:30:39 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:38557 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728487AbfBDOaj (ORCPT ); Mon, 4 Feb 2019 09:30:39 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A0D492FD2 for ; Mon, 4 Feb 2019 09:30:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 04 Feb 2019 09:30:35 -0500 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=fm3; bh=LarlCpzp6UgRr9+h/05fmKsND8 qUkACa33Qy8wAL6h0=; b=r9Bvs6VUA/qvWppaTgyR1QASdQudWI3x/Baw9IG3OH bGSYuYiIqjc/BiXZh9jpwGogP0AfVAdYmZip5vnA6od0CqWRY5vphZActvWfAKJt fQXM3+4bPGyNX8Ib9OtcjmwPbKaBwWfXvQ/zNcQhY4vGu2PFX+axXssii0G+KwBo DZan0RvvP1og3bsSISrlGtWV0/C+BffmgDodKIqKJIAN8yigjj+24+5bpPNfUsqC 7ziatkcdLRSNUGns7srDxYx3rWDuKbyd9hXpItVWv8LE/H36J4t6Twa7+23FkX0J 1ipzqcxXI5l/7tNTig895MnlOBpK4GqyjIDPthjvIHXA== 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=fm1; bh=LarlCpzp6UgRr9+h/ 05fmKsND8qUkACa33Qy8wAL6h0=; b=tqicsaut6JyfEP4Lh956MPCy7cAdcmY5y 2UvqXny1BiJFcQZpBhFw1hmLz5dxXuudJGoXaCPUXTjCpmENrFdT9cd/Jn+ahbE8 O2CIhmNF8we+IsFLksonirdlPpRbji81IspyqfqxX5TjQaM/4swS8U3bLZ/8xth0 OzQQmvavd4UBOHf6908+CBr8IRWPXsP18bWLFO74ZXyQXgB6+e7Naz4wq4/xaExw 5JKww/iUECYGcsEb3oI/KRMhL8k12n/9Nu24PnGuaQE2O8VyciPQoiw14FLhhGPN DTl8EPjjg0DOkh03YXcKGDF8Jgf4MjEDElIiNoCleEeVGPUBiiz3w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrkeeggdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheprfgrth hrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecukfhppeejkedr heehrddvgeelrdeifeenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh enucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from NSJAIL (x4e37f93f.dyn.telefonica.de [78.55.249.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 1FE4C100BB for ; Mon, 4 Feb 2019 09:30:34 -0500 (EST) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id 06772a5d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 4 Feb 2019 14:30:31 +0000 (UTC) From: Patrick Steinhardt To: linux-nfs@vger.kernel.org Cc: Patrick Steinhardt Subject: [PATCH 1/3] configure.ac: more carefully detect availability of res_querydomain(3) Date: Mon, 4 Feb 2019 15:31:18 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since glibc 2.2, the function res_querydomain(3) is implemented as a define to `__res_querydomain`. Due to this implementation detail, using `AC_CHECK_LIB` with a symbol name of "res_querydomain" will cause a linking failure and thus fail to detect its availability. This is why right now, we try to detect availability of `__res_querydomain` instead. Unfortunately, this may break on other platforms where there is no `__res_querydomain` but only the function without leading underscores. To fix this, we can perform another `AC_CHECK_LIB([resolv], [res_querydomain], ...)` call in case where the other one was not found and only raise an error if both symbols weren't found. Signed-off-by: Patrick Steinhardt --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4bf5aea..cb9d921 100644 --- a/configure.ac +++ b/configure.ac @@ -411,7 +411,8 @@ if test "$enable_gss" = yes; then fi dnl libdnsidmap specific checks -AC_CHECK_LIB([resolv], [__res_querydomain], , AC_MSG_ERROR(res_querydomain needed)) +AC_CHECK_LIB([resolv], [__res_querydomain], , + AC_CHECK_LIB([resolv], [res_querydomain], , AC_MSG_ERROR(res_querydomain needed))) AC_ARG_ENABLE([ldap], [AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])]) From patchwork Mon Feb 4 14:31:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 10795785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02A356C2 for ; Mon, 4 Feb 2019 14:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6B762B48E for ; Mon, 4 Feb 2019 14:30:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3BC42B76A; Mon, 4 Feb 2019 14:30:41 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A41002B48E for ; Mon, 4 Feb 2019 14:30:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728487AbfBDOaj (ORCPT ); Mon, 4 Feb 2019 09:30:39 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:47527 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727722AbfBDOaj (ORCPT ); Mon, 4 Feb 2019 09:30:39 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D13702FF1 for ; Mon, 4 Feb 2019 09:30:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 04 Feb 2019 09:30:35 -0500 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=fm3; bh=GrIkU933ivKlb h8bDbAVJjXXbG4bCUFmUlXmhwWswqc=; b=eWcaVEwRCqQeTB/LVNySoGuUfJu59 DWjKaB5jcmy7FL9tOLOKOW1G1rur1a6uYE+IPhfpsaLF3hQ5cC8iGpOj9A7/FhvK 9YiFX81rKB7dCYEr9cxm/K8OTpr7gB7puCMlzxVFp9MTYe3mw6/Mxdpvpu+NvK/T NUiv3NPYzj4iDhHMnau3q9Mq88kJI7gagNS4zWYMlCu88WQ9WHFHl7nzJvR5LkCP KIHGCfDICzjV2r5XIucpLZnAFQembGpUPtz10z6R3UFdL2lZOvbkGZqhV+RDhWbu LsuS0VYTlUEh3lpAcNchsX5l8w7TfoWoO+tLamAqTBe9YqOyxKD38fULA== 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= fm1; bh=GrIkU933ivKlbh8bDbAVJjXXbG4bCUFmUlXmhwWswqc=; b=ntHz+1e4 me9QhLQicymG+1lAL36b82W+0WlZ1PE7wvXLd5qzala701Vxbol0tY2UZ7w7wkM8 s6EIJukkXKzKCjqYTa9o8hKfUoh5MKNPM0JaeO956mGEPvKFJu1nTzyyFNNGhUK0 ++h7Domn6Qroj8AdlDJpfp7IOnusP2v8W0Ga+OFHF60MJ6v+xSmyjCnngYzA6TE1 A7tjmV0SF4BwkTXCwTyF6ogf6aiKzL5Lyw5ezK2QEGo/YdTdOjx7nQUM6xFANGXv KDppwwE4A9iteCrNM/uvtWrPd2Uh0cRP3o86XP7MHSN414+V6GF9Fba9IK0IvBsI 9smj8lhVrABC1w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrkeeggdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheprf grthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecukfhppeej kedrheehrddvgeelrdeifeenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrd himhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from NSJAIL (x4e37f93f.dyn.telefonica.de [78.55.249.63]) by mail.messagingengine.com (Postfix) with ESMTPA id BBD8B1031B for ; Mon, 4 Feb 2019 09:30:34 -0500 (EST) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id 822cd24f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 4 Feb 2019 14:30:32 +0000 (UTC) From: Patrick Steinhardt To: linux-nfs@vger.kernel.org Cc: Patrick Steinhardt Subject: [PATCH 2/3] file: fix missing include for PATH_MAX constant Date: Mon, 4 Feb 2019 15:31:19 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While making use of the PATH_MAX constant, "file.c" does not include the "limits.h" header. While it is being transitively included via other headers on most platforms, it is not on e.g. musl-based systems. Add the include to fix compilation. Signed-off-by: Patrick Steinhardt --- support/misc/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/support/misc/file.c b/support/misc/file.c index 4065376..e7c3819 100644 --- a/support/misc/file.c +++ b/support/misc/file.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "xlog.h" #include "misc.h" From patchwork Mon Feb 4 14:31:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 10795783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C59EC159A for ; Mon, 4 Feb 2019 14:30:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5EF02B1D8 for ; Mon, 4 Feb 2019 14:30:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B41332B77B; Mon, 4 Feb 2019 14:30:41 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C6E22B63A for ; Mon, 4 Feb 2019 14:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725992AbfBDOak (ORCPT ); Mon, 4 Feb 2019 09:30:40 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:57937 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728520AbfBDOaj (ORCPT ); Mon, 4 Feb 2019 09:30:39 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6403F3001 for ; Mon, 4 Feb 2019 09:30:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 04 Feb 2019 09:30:36 -0500 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=fm3; bh=CQHjECEP+dCcT V5k2qRzwix6WLYpFTjOHiPw+raa6zY=; b=x3JKaDkeqn8M7+sXFVWca02HxIB4C S5RZPHac9j6YKWkQUbZwF1gBMufwhfZZHYM7ey+7sshAy8XjY0/tKQk1Flcp3nBG bXGDbk/uwhiYZQLhyTo/0BmFAiKvSM3hkrV9f70ae85aq8qTZ8Yg/ErDu4fT3AGz yU7l4ARPVaE+U+O9q0sHjMkFaEcXmDaKK3lB5u8tOnGPOTFVauflTp1WKbPz5bn6 zghGBqQMnH7PzE8F33XlkxY3lDvNmHBPTQHBG2uXLoXawAuYurxVWpsOoSmOryLr 7fmJD11SvCVPVzCugpIAcicSVY8T995819GfPYOiBycybGxWJFT02j89Q== 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= fm1; bh=CQHjECEP+dCcTV5k2qRzwix6WLYpFTjOHiPw+raa6zY=; b=G85uSggS E4LHvJtfqN/KYgYHhUmRualAPJH8VNZizJ8t5orl6qZCKYsyTLlNsNFryK2mhYZG TtB6TfTTtwZ/Rg15pzsxyTwHTXPqTSEIwsgOChCSQc/FFxI6YQo6H13BlOcW3W2N qDi6XpUBBsJdrU4e7XtMPAGTOHEya/3bKwLj+ThyEhmqxncEULaMFqdRX5FAm8ZF g2zwKIk0HxI1vJZCXUpVeCvd31D58LtIAc/aSYswLQjjEmOadjkeC9LcGc4d0+MW PHmUcSIyyn3ly1ZWhF+hqtt7xcDu2rLvRw45bGKXxMWGmakAgdazgp5JFdXtYlh3 /nEh4Y7Fbum9lQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrkeeggdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheprf grthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecukfhppeej kedrheehrddvgeelrdeifeenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrd himhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from NSJAIL (x4e37f93f.dyn.telefonica.de [78.55.249.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 5CEBE10310 for ; Mon, 4 Feb 2019 09:30:35 -0500 (EST) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id 2919fab4 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 4 Feb 2019 14:30:32 +0000 (UTC) From: Patrick Steinhardt To: linux-nfs@vger.kernel.org Cc: Patrick Steinhardt Subject: [PATCH 3/3] svc_socket: fix use of undefined macro HAVE_GETRPCBYNUMBER_R Date: Mon, 4 Feb 2019 15:31:20 +0100 Message-Id: <5e9826aa52e17d30d7cfee0d3828c5dbecdbfc41.1549290423.git.ps@pks.im> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The macro HAVE_GETRPCBYNUMBER_R is set based on whether the `getrpcbynumber_r` function was found by autoconf or not. While another location correctly checks whether it is set by using `#ifdef`, `getservport()` instead wrongly uses `#if HAVE_GETRPCBYNUMBER_R`. This may cause a compilation error with gcc with "-Werror=undef" if the macro has not been defined. Fix the error by using `#ifdef` instead. Signed-off-by: Patrick Steinhardt --- support/nfs/svc_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/nfs/svc_socket.c b/support/nfs/svc_socket.c index 1239712..d56507a 100644 --- a/support/nfs/svc_socket.c +++ b/support/nfs/svc_socket.c @@ -46,7 +46,7 @@ int getservport(u_long number, const char *proto) struct rpcent *rpcp; struct servent servbuf, *servp = NULL; int ret = 0; -#if HAVE_GETRPCBYNUMBER_R +#ifdef HAVE_GETRPCBYNUMBER_R char rpcdata[1024]; struct rpcent rpcbuf;