summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/rcmdsh.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-02-27 13:40:01 +0000
committernectar <nectar@FreeBSD.org>2003-02-27 13:40:01 +0000
commit0d65b541d4b09e3c91112b5b2ffe0efa9a390a55 (patch)
tree205498ba7f9a56de737c44c088026af3e03556ca /lib/libc/net/rcmdsh.c
parentae8811433e5eff867ac6b45eb3e972f8b0c6310c (diff)
downloadFreeBSD-src-0d65b541d4b09e3c91112b5b2ffe0efa9a390a55.zip
FreeBSD-src-0d65b541d4b09e3c91112b5b2ffe0efa9a390a55.tar.gz
Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
Diffstat (limited to 'lib/libc/net/rcmdsh.c')
-rw-r--r--lib/libc/net/rcmdsh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c
index 7972e34..bc4e87a 100644
--- a/lib/libc/net/rcmdsh.c
+++ b/lib/libc/net/rcmdsh.c
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
@@ -86,7 +87,8 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog)
hints.ai_flags = AI_CANONNAME;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- (void)snprintf(num, sizeof(num), "%d", ntohs(rport));
+ (void)snprintf(num, sizeof(num), "%u",
+ (unsigned int)ntohs(rport));
error = getaddrinfo(*ahost, num, &hints, &res);
if (error) {
fprintf(stderr, "rcmdsh: getaddrinfo: %s\n",
OpenPOWER on IntegriCloud