From patchwork Tue Nov 23 17:20:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 350021 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oANHKYBJ004964 for ; Tue, 23 Nov 2010 17:20:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113Ab0KWRUd (ORCPT ); Tue, 23 Nov 2010 12:20:33 -0500 Received: from mail-iw0-f174.google.com ([209.85.214.174]:56671 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754098Ab0KWRUd (ORCPT ); Tue, 23 Nov 2010 12:20:33 -0500 Received: by iwn33 with SMTP id 33so334010iwn.19 for ; Tue, 23 Nov 2010 09:20:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:subject:to:cc :date:message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=FvW92R5baFGFBAjy8PZxEemJr+19jxxdecRZptIvquw=; b=vaUoRKcl7UE6aTY4F2yU0zEF8pFpKk+ie+CX4HGjEPm4I/dexKcDk3nzHFpE1RozdR 4RkcvFlOOz+8mxrpNd+PWovK3GEnUpkK2t4rpb4UslkhfNyRMVpntj/LMq8of0E2/MwB ocGiT9bCMS4CiHSCgEy1CvoSiFycHfxIM36Ys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; b=VzkQbRN+0Kz3vpFH5JzPtPKqD2u2xUPBVG3BjIol7EMoqe99iBcpL7zBMPuWA7ONEB sUl+W7P+UW+ruEC8nbw8MXVUtuMgNV50Kw3pnHPzFkHNesVj0/50PAEkRfA7BSjuSVB4 B+ZCtkZA5Ppi51+UJ5oQYQIW4ppCVLLcJvCBc= Received: by 10.231.85.138 with SMTP id o10mr8505123ibl.165.1290532832043; Tue, 23 Nov 2010 09:20:32 -0800 (PST) Received: from matisse.1015granger.net (adsl-99-26-161-222.dsl.sfldmi.sbcglobal.net [99.26.161.222]) by mx.google.com with ESMTPS id 34sm6746450ibi.2.2010.11.23.09.20.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Nov 2010 09:20:30 -0800 (PST) From: Chuck Lever Subject: [PATCH] NSM: Make use of AI_NUMERICSERV conditional To: gzp@papp.h Cc: linux-nfs@vger.kernel.org Date: Tue, 23 Nov 2010 12:20:28 -0500 Message-ID: <20101123171816.28603.10491.stgit@matisse.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 23 Nov 2010 17:20:55 +0000 (UTC) diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c index b7f4371..1f490b0 100644 --- a/utils/statd/sm-notify.c +++ b/utils/statd/sm-notify.c @@ -34,6 +34,11 @@ #include "nsm.h" #include "nfsrpc.h" +/* glibc before 2.3.4 */ +#ifndef AI_NUMERICSERV +#define AI_NUMERICSERV 0 +#endif + #define NSM_TIMEOUT 2 #define NSM_MAX_TIMEOUT 120 /* don't make this too big */ @@ -248,6 +253,7 @@ smn_bind_address(const char *srcaddr, const char *srcport) if (srcaddr == NULL) hint.ai_flags |= AI_PASSIVE; + /* Do not allow "node" and "service" parameters both to be NULL */ if (srcport == NULL) error = getaddrinfo(srcaddr, "", &hint, &ai); else