This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/1] rpc: Include missing portmap headers


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 --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.  */
-- 
2.16.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]