diff mbox

[1/1] rpc: Include missing portmap headers

Message ID 20180130153628.23069-1-pvorel@suse.cz
State New
Headers show

Commit Message

Petr Vorel Jan. 30, 2018, 3:36 p.m. UTC
man pmap_set (rpc/pmap_clnt.h) and man pmap_unset (rpc/pmap_clnt.h) both
lead to rpc(3) and that manual page explicitly
says 'To take use of these routines, include the header file
<rpc/rpc.h>'.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

While compiling a rpc test server[1] we get implicit declaration warning
for pmap_unset(). The question is if the pmap_*.h headers should be
included in rpc.h or not, i.e. if this is a bug in the test or in the
glibc header.
[1] https://github.com/linux-test-project/ltp/blob/master/testcases/network/rpc/basic_tests/rpc01/rpc_server.c

Kind regards,
Petr
---
 sunrpc/rpc/rpc.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/sunrpc/rpc/rpc.h b/sunrpc/rpc/rpc.h
index 173a4e31ea..213a3384a1 100644
--- a/sunrpc/rpc/rpc.h
+++ b/sunrpc/rpc/rpc.h
@@ -64,6 +64,10 @@ 
 /* routines for parsing /etc/rpc */
 #include <rpc/netdb.h>		/* structures and routines to parse /etc/rpc */
 
+/* Portmapper client, server, and protocol headers */
+#include <rpc/pmap_clnt.h>
+#include <rpc/pmap_prot.h>
+
 __BEGIN_DECLS
 
 /* Global variables, protected for multi-threaded applications.  */