public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: Patrick Steinhardt <ps@pks.im>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/3] svc_socket: fix use of undefined macro HAVE_GETRPCBYNUMBER_R
Date: Wed, 27 Feb 2019 12:16:18 -0500	[thread overview]
Message-ID: <b4f940b5-d073-7aff-7f20-0644a6e57be4@RedHat.com> (raw)
In-Reply-To: <5e9826aa52e17d30d7cfee0d3828c5dbecdbfc41.1549290423.git.ps@pks.im>



On 2/4/19 9:31 AM, Patrick Steinhardt wrote:
> 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 <ps@pks.im>
Committed...

BTW... If the future, feel free to ping me it appears 
patches slide off my radar... like these did... ;-( 

steved.
> ---
>  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;
>  
> 

  reply	other threads:[~2019-02-27 17:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 14:31 [PATCH 1/3] configure.ac: more carefully detect availability of res_querydomain(3) Patrick Steinhardt
2019-02-04 14:31 ` [PATCH 2/3] file: fix missing include for PATH_MAX constant Patrick Steinhardt
2019-02-27 17:14   ` Steve Dickson
2019-02-04 14:31 ` [PATCH 3/3] svc_socket: fix use of undefined macro HAVE_GETRPCBYNUMBER_R Patrick Steinhardt
2019-02-27 17:16   ` Steve Dickson [this message]
2019-02-27 17:37     ` Patrick Steinhardt
2019-02-22  7:52 ` [PATCH 1/3] configure.ac: more carefully detect availability of res_querydomain(3) Patrick Steinhardt
2019-02-22 20:40   ` J. Bruce Fields
2019-02-27 16:41   ` Steve Dickson
2019-02-27 17:14 ` 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=b4f940b5-d073-7aff-7f20-0644a6e57be4@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=ps@pks.im \
    /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