diff options
| author | Jacques Vidrine <nectar@FreeBSD.org> | 2003-02-27 13:40:01 +0000 |
|---|---|---|
| committer | Jacques Vidrine <nectar@FreeBSD.org> | 2003-02-27 13:40:01 +0000 |
| commit | 2bbd7cf8204609d07c36511f2a57ca282f05b6f2 (patch) | |
| tree | 205498ba7f9a56de737c44c088026af3e03556ca /lib/libc/net/rcmdsh.c | |
| parent | 20902bd3e19d215edc5d198801bac4b7956bf83e (diff) | |
Notes
Diffstat (limited to 'lib/libc/net/rcmdsh.c')
| -rw-r--r-- | lib/libc/net/rcmdsh.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c index 7972e34eeef2..bc4e87af9faf 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", |
