Blame SOURCES/0002-helpers-Fix-for-warning-when-compiling-against-libti.patch

716360
From c7936a2355398fd071010e8c2da9fc44a048d1cb Mon Sep 17 00:00:00 2001
716360
From: Phil Sutter <phil@nwl.cc>
716360
Date: Tue, 12 Feb 2019 23:35:06 +0100
716360
Subject: [PATCH] helpers: Fix for warning when compiling against libtirpc
716360
716360
Fix for the following warning:
716360
716360
In file included from rpc.c:29:
716360
/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
716360
  214 | extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
716360
      |                                                    ^~~~~~~
716360
716360
Struct rpc_err is declared in rpc/clnt.h which also declares rpc_call(),
716360
therefore rename the local version.
716360
716360
Fixes: 5ededc4476f27 ("conntrackd: search for RPC headers")
716360
Signed-off-by: Phil Sutter <phil@nwl.cc>
716360
Acked-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
716360
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
716360
(cherry picked from commit ea9f896ed6a9b47b3a9a32bf594f57e6f6da97df)
716360
---
716360
 src/helpers/rpc.c | 7 ++++---
716360
 1 file changed, 4 insertions(+), 3 deletions(-)
716360
716360
diff --git a/src/helpers/rpc.c b/src/helpers/rpc.c
716360
index 3a7b337135f04..bd24dd3269c8e 100644
716360
--- a/src/helpers/rpc.c
716360
+++ b/src/helpers/rpc.c
716360
@@ -26,6 +26,7 @@
716360
 
716360
 #include <errno.h>
716360
 
716360
+#include <rpc/clnt.h>
716360
 #include <rpc/rpc_msg.h>
716360
 #include <rpc/pmap_prot.h>
716360
 #define _GNU_SOURCE
716360
@@ -114,8 +115,8 @@ nf_nat_rpc(struct pkt_buff *pkt, int dir, struct nf_expect *exp,
716360
 #define ROUNDUP(n)	((((n) + 3)/4)*4)
716360
 
716360
 static int
716360
-rpc_call(const uint32_t *data, uint32_t offset, uint32_t datalen,
716360
-	 struct rpc_info *rpc_info)
716360
+rpc_parse_call(const uint32_t *data, uint32_t offset, uint32_t datalen,
716360
+	       struct rpc_info *rpc_info)
716360
 {
716360
 	uint32_t p, r;
716360
 
716360
@@ -393,7 +394,7 @@ rpc_helper_cb(struct pkt_buff *pkt, uint32_t protoff,
716360
 	}
716360
 
716360
 	if (rm_dir == CALL) {
716360
-		if (rpc_call(data, offset, datalen, rpc_info) < 0)
716360
+		if (rpc_parse_call(data, offset, datalen, rpc_info) < 0)
716360
 			goto out;
716360
 
716360
 		rpc_info->xid = xid;
716360
-- 
716360
2.34.1
716360