summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2019-09-26 15:27:23 -0400
committerSteve Dickson <steved@redhat.com>2019-09-26 15:27:23 -0400
commit9a40fb4fb35506f6f1423318ed736caf5e490fb7 (patch)
tree509992d9831796507b2e358b03c44da91d59525d
parent06a3103a871de29478e499818ef227779c1dd9a6 (diff)
downloadrpcbind-9a40fb4fb35506f6f1423318ed736caf5e490fb7.tar.gz
rpcbind: Add missing includes
On musl systems there are implicit function declaration warnings due to missing string.h include. src/pmap_svc.c: In function ‘pmapproc_change’: src/pmap_svc.c:225:8: warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration] if (!memcmp(rpcbreg.r_netid, "udp6", 4) || ^~~~~~ src/pmap_svc.c: In function ‘pmap_netid2ipprot’: src/pmap_svc.c:408:6: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] if (strcmp(netid, tcptrans) == 0) ^~~~~~ src/warmstart.c: In function ‘read_struct’: src/warmstart.c:116:22: warning: implicit declaration of function ‘strerror’; did you mean ‘perror’? [-Wimplicit-function-declaration] filename, errno, strerror(errno)); ^~~~~~~~ perror Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--src/pmap_svc.c1
-rw-r--r--src/warmstart.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/pmap_svc.c b/src/pmap_svc.c
index a53dd5f..e5a5d0f 100644
--- a/src/pmap_svc.c
+++ b/src/pmap_svc.c
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
+#include <string.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/rpcb_prot.h>
diff --git a/src/warmstart.c b/src/warmstart.c
index aafcb61..8ecd933 100644
--- a/src/warmstart.c
+++ b/src/warmstart.c
@@ -35,6 +35,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
+#include <string.h>
#include <rpc/rpc.h>
#include <rpc/rpcb_prot.h>
#include <rpc/xdr.h>