summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/rcmd.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 16:48:51 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 16:48:51 +0000
commitaea60bee5e9bad0aab62f480f19c2fb34c068de4 (patch)
tree1e7befbc10e28796528939427d4fdbd94b60d9af /lib/libc/net/rcmd.c
parentMore evil bootstrap code. #ifndef ALIGNBYTES #define ALIGNBYTES 3. (diff)
downloadwireguard-openbsd-aea60bee5e9bad0aab62f480f19c2fb34c068de4.tar.xz
wireguard-openbsd-aea60bee5e9bad0aab62f480f19c2fb34c068de4.zip
Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther
Diffstat (limited to 'lib/libc/net/rcmd.c')
-rw-r--r--lib/libc/net/rcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 617fe440aa0..afa59dde973 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -28,7 +28,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -39,6 +38,7 @@
#include <fcntl.h>
#include <netdb.h>
#include <unistd.h>
+#include <limits.h>
#include <pwd.h>
#include <errno.h>
#include <stdio.h>
@@ -59,7 +59,7 @@ int
rcmd_af(char **ahost, int porta, const char *locuser, const char *remuser,
const char *cmd, int *fd2p, int af)
{
- static char hbuf[MAXHOSTNAMELEN];
+ static char hbuf[HOST_NAME_MAX+1];
char pbuf[NI_MAXSERV];
struct addrinfo hints, *res, *r;
int error;