rpc: Add missing header
PATCH 1/1 rpc: Add missing header
This fixes: implicit declaration of function ‘pmap_unset’.
--- testcases/network/rpc/basic_tests/rpc01/rpc_server.c | 1 + 1 file changed, 1 insertion(+)
testcases/network/rpc/basic_tests/rpc01/rpc_server.c +1 -0
@@ -6,6 +6,7 @@#include <stdlib.h> #include <unistd.h> #include <rpc/rpc.h> +#include <rpc/pmap_clnt.h> #include "librpc01.h" int debug =0 ;
Signature · 1 line
2.12.0
PATCH 1/1 rpc: Add missing header
Hi!
Quoted 1 line
This fixes: implicit declaration of function ???pmap_unset???.
Hmm, the man 3 rpc only states that <rpc/rpc.h> needs to be included, what distro this fails on?
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 rpc: Add missing header
Hi Cyril!
Quoted 4 lines
Quoted 1 line
This fixes: implicit declaration of function ???pmap_unset???.
Hmm, the man 3 rpc only states that <
rpc/rpc.h> needs to be included, what distro this fails on?
Various distros. Tested on these:
* Debian testing/unstable (with recent updates)
$ lsb_release -a Distributor ID: Debian Description: Debian GNU/Linux 9.0 (stretch) Release: 9.0 Codename: stretch
$ gcc --version gcc (Debian 6.3.0-8) 6.3.0 20170221
* Debian stretch cross compilation to sparc64
$ sparc64-linux-gnu-gcc --version sparc64-linux-gnu-gcc (Debian 6.3.0-9) 6.3.0 20170316
* openSUSE Tumbleweed (with recent updates)
$ lsb_release -a LSB Version: n/a Distributor ID: openSUSE Description: openSUSE Tumbleweed Release: 20170311 Codename: n/a
$ gcc --version gcc (SUSE Linux) 6.3.1 20170202 [gcc-6-branch revision 245119]
Error is:rpc_server.c: In function ‘main’:
rpc_server.c:78:2: warning: implicit declaration of function ‘pmap_unset’ [-Wimplicit-function-declaration]
pmap_unset(program, version);
But maybe I'm wrong, doing some mistake.
Kind regards,
Petr
PATCH 1/1 rpc: Add missing header
Hi!
Quoted 8 lines
Quoted 2 lines
Hmm, the man 3 rpc only states that <
rpc/rpc.h> needs to be included, what distro this fails on?Error is:
rpc_server.c: In function ???main???:
rpc_server.c:78:2: warning: implicit declaration of function ???pmap_unset??? [-Wimplicit-function-declaration]
pmap_unset(program, version);But maybe I'm wrong, doing some mistake.
Looks to me like glibc bug. Since the tirpc/rpc/rpc.h includes the rpc/pmap_clnt.h while the glibc equivalent does not. But I'm not expect on RPC either. I guess that we should better ask on the glibc ML.
Signature · 2 lines
Cyril Hrubis [email protected]