All of lore.kernel.org
 help / color / mirror / Atom feed
* [conntrack-tools PATCH] helpers: Fix for warning when compiling against libtirpc
@ 2019-11-11 17:20 Phil Sutter
  2019-11-12 10:58 ` Arturo Borrero Gonzalez
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Sutter @ 2019-11-11 17:20 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, Ash Hughes

Fix for the following warning:

In file included from rpc.c:29:
/usr/include/tirpc/rpc/rpc_msg.h:214:52: warning: 'struct rpc_err' declared inside parameter list will not be visible outside of this definition or declaration
  214 | extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
      |                                                    ^~~~~~~

Struct rpc_err is declared in rpc/clnt.h which also declares rpc_call(),
therefore rename the local version.

Fixes: 5ededc4476f27 ("conntrackd: search for RPC headers")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/helpers/rpc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/helpers/rpc.c b/src/helpers/rpc.c
index 3a7b337135f04..bd24dd3269c8e 100644
--- a/src/helpers/rpc.c
+++ b/src/helpers/rpc.c
@@ -26,6 +26,7 @@
 
 #include <errno.h>
 
+#include <rpc/clnt.h>
 #include <rpc/rpc_msg.h>
 #include <rpc/pmap_prot.h>
 #define _GNU_SOURCE
@@ -114,8 +115,8 @@ nf_nat_rpc(struct pkt_buff *pkt, int dir, struct nf_expect *exp,
 #define ROUNDUP(n)	((((n) + 3)/4)*4)
 
 static int
-rpc_call(const uint32_t *data, uint32_t offset, uint32_t datalen,
-	 struct rpc_info *rpc_info)
+rpc_parse_call(const uint32_t *data, uint32_t offset, uint32_t datalen,
+	       struct rpc_info *rpc_info)
 {
 	uint32_t p, r;
 
@@ -393,7 +394,7 @@ rpc_helper_cb(struct pkt_buff *pkt, uint32_t protoff,
 	}
 
 	if (rm_dir == CALL) {
-		if (rpc_call(data, offset, datalen, rpc_info) < 0)
+		if (rpc_parse_call(data, offset, datalen, rpc_info) < 0)
 			goto out;
 
 		rpc_info->xid = xid;
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [conntrack-tools PATCH] helpers: Fix for warning when compiling against libtirpc
  2019-11-11 17:20 [conntrack-tools PATCH] helpers: Fix for warning when compiling against libtirpc Phil Sutter
@ 2019-11-12 10:58 ` Arturo Borrero Gonzalez
  2019-11-12 21:07   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Arturo Borrero Gonzalez @ 2019-11-12 10:58 UTC (permalink / raw)
  To: Phil Sutter; +Cc: Pablo Neira Ayuso, netfilter-devel, Ash Hughes

On 11/11/19 6:20 PM, Phil Sutter wrote:
> Fix for the following warning:
> 
> In file included from rpc.c:29:
> /usr/include/tirpc/rpc/rpc_msg.h:214:52: warning: 'struct rpc_err' declared inside parameter list will not be visible outside of this definition or declaration
>   214 | extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
>       |                                                    ^~~~~~~
> 
> Struct rpc_err is declared in rpc/clnt.h which also declares rpc_call(),
> therefore rename the local version.
> 
> Fixes: 5ededc4476f27 ("conntrackd: search for RPC headers")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> ---
>  src/helpers/rpc.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 

Acked-by: Arturo Borrero Gonzalez <arturo@netfilter.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [conntrack-tools PATCH] helpers: Fix for warning when compiling against libtirpc
  2019-11-12 10:58 ` Arturo Borrero Gonzalez
@ 2019-11-12 21:07   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2019-11-12 21:07 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez; +Cc: Phil Sutter, netfilter-devel, Ash Hughes

On Tue, Nov 12, 2019 at 11:58:30AM +0100, Arturo Borrero Gonzalez wrote:
> On 11/11/19 6:20 PM, Phil Sutter wrote:
> > Fix for the following warning:
> > 
> > In file included from rpc.c:29:
> > /usr/include/tirpc/rpc/rpc_msg.h:214:52: warning: 'struct rpc_err' declared inside parameter list will not be visible outside of this definition or declaration
> >   214 | extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
> >       |                                                    ^~~~~~~
> > 
> > Struct rpc_err is declared in rpc/clnt.h which also declares rpc_call(),
> > therefore rename the local version.
> > 
> > Fixes: 5ededc4476f27 ("conntrackd: search for RPC headers")
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > ---
> >  src/helpers/rpc.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> 
> Acked-by: Arturo Borrero Gonzalez <arturo@netfilter.org>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-12 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 17:20 [conntrack-tools PATCH] helpers: Fix for warning when compiling against libtirpc Phil Sutter
2019-11-12 10:58 ` Arturo Borrero Gonzalez
2019-11-12 21:07   ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.