summaryrefslogtreecommitdiffstats
path: root/lib/libutil
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/libutil
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/libutil')
-rw-r--r--lib/libutil/readlabel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libutil/readlabel.c b/lib/libutil/readlabel.c
index 1260d7b27f5..e2cee311d28 100644
--- a/lib/libutil/readlabel.c
+++ b/lib/libutil/readlabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readlabel.c,v 1.12 2014/06/30 00:25:37 deraadt Exp $ */
+/* $OpenBSD: readlabel.c,v 1.13 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 1996, Jason Downs. All rights reserved.
@@ -25,7 +25,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/disk.h>
#include <sys/dkio.h>
#define DKTYPENAMES
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <err.h>
#include <errno.h>
+#include <limits.h>
#include <fcntl.h>
#include <paths.h>
#include <string.h>
@@ -49,7 +50,7 @@
char *
readlabelfs(char *device, int verbose)
{
- char rpath[MAXPATHLEN];
+ char rpath[PATH_MAX];
struct dk_diskmap dm;
struct disklabel dk;
char part, *type;