From patchwork Mon Dec 6 16:10:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 378682 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 oB6G9dCv026638 for ; Mon, 6 Dec 2010 16:10:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751993Ab0LFQKH (ORCPT ); Mon, 6 Dec 2010 11:10:07 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:37985 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120Ab0LFQKG (ORCPT ); Mon, 6 Dec 2010 11:10:06 -0500 Received: by gyb11 with SMTP id 11so6071797gyb.19 for ; Mon, 06 Dec 2010 08:10:05 -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:in-reply-to:references:user-agent:mime-version :content-type:content-transfer-encoding; bh=XStpWF7lonJncoqOrQoYV4OG4ISXA0adEc+ZWikYG6Y=; b=SmmSB7XqSGMJBLq7+FQ4Kaw/xd/5u2UuLgg3FhrbbVXfeaZoiDpjgwXjlGr1ACxTnx lYWTFDbfPgDfV7nbRDdlb5gpRXHbnpblhE2XzDNGWQE/545P4brok5Nb4JUWY5Wn2M9X 9BfutCBqIPyFmSIvPg7a4XEfvFTb3Gfzutycg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=EPQGFy+XDeuzozl2r/uYmFPgStGAB2tQbI4hiRQMsM2GHJawMSmiXAC6YT8mwpZqUR /ElEFJP5lUieRKqPxWR0OezfqS+GfeHzRP6QWQWU00TJOM1EBxqD+YySd8J72kgPmsVf Ig8UqtKa0MKBTCjf3Jo5BCjMYWUVvqF1pPRC4= Received: by 10.42.170.7 with SMTP id d7mr423619icz.499.1291651805134; Mon, 06 Dec 2010 08:10:05 -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 34sm5144238ibi.20.2010.12.06.08.10.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Dec 2010 08:10:04 -0800 (PST) From: Chuck Lever Subject: [PATCH 3/3] sm-notify: Make use of AI_NUMERICSERV conditional To: steved@redhat.com Cc: linux-nfs@vger.kernel.org Date: Mon, 06 Dec 2010 11:10:02 -0500 Message-ID: <20101206161002.18361.24632.stgit@matisse.1015granger.net> In-Reply-To: <20101206160206.18361.26178.stgit@matisse.1015granger.net> References: <20101206160206.18361.26178.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]); Mon, 06 Dec 2010 16:10:08 +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