public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: libtirpc-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org
Subject: Re: [PATCH [rpcbind]] fix building one systems w/out nss.h
Date: Tue, 19 Feb 2013 14:14:51 -0500	[thread overview]
Message-ID: <201302191414.51958.vapier@gentoo.org> (raw)
In-Reply-To: <D1025EAD-8EEB-40A4-8EA4-0D21ECC16B66@oracle.com>

[-- Attachment #1: Type: Text/Plain, Size: 1239 bytes --]

On Tuesday 19 February 2013 13:54:19 Chuck Lever wrote:
> On Feb 19, 2013, at 1:48 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > The nss.h header is glibc-specific, so use the existing HAVE_NSS_H define
> > to avoid including/using it when it is not available.
> > --- a/src/rpcbind.c
> > +++ b/src/rpcbind.c
> > @@ -67,7 +67,11 @@
> > #include <pwd.h>
> > #include <string.h>
> > #include <errno.h>
> > +#ifdef HAVE_NSS_H
> > #include <nss.h>
> > +#else
> > +static inline void __nss_configure_lookup(const char *db, const char *s)
> > {} +#endif
> 
> Where is rpcbind getting the __nss_configure_lookup() function in this
> case?  I don't see that the call sites are ifdef-d out if HAVE_NSS_H is
> not defined.

i'm not sure what you mean.

if nss.h exists, then HAVE_NSS_H is defined, and the nss.h header provides the 
__nss_configure_lookup prototype (and presumably, the C library provides that 
func).

if nss.h doesn't exist, then HAVE_NSS_H is not defined, so we have to stub out 
the __nss_configure_lookup func.  i could have put "#ifdef HAVE_NSS_H" around 
all the call sites, but i think this version is cleaner and less error prone.

also, i typoed the subject name ("one" vs "on").
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-02-19 19:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19 18:48 [PATCH [rpcbind]] fix building one systems w/out nss.h Mike Frysinger
2013-02-19 18:54 ` Chuck Lever
2013-02-19 19:14   ` Mike Frysinger [this message]
2013-02-19 19:16     ` Chuck Lever
2013-02-21 15:43 ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201302191414.51958.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=chuck.lever@oracle.com \
    --cc=libtirpc-devel@lists.sourceforge.net \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox