diff options
author | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-05-23 11:22:05 -0500 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-05-23 11:22:05 -0500 |
commit | 1888d833acac54bc81e87d2052385430472a65f6 (patch) | |
tree | 28de136a817df2805833fa5732b569e0a0ae5845 /bin/ls/util.c | |
parent | d50a3cfe49d6ab7aa1db8380dde1508cafe67b7d (diff) | |
download | userland-1888d833acac54bc81e87d2052385430472a65f6.tar.gz userland-1888d833acac54bc81e87d2052385430472a65f6.tar.bz2 userland-1888d833acac54bc81e87d2052385430472a65f6.tar.xz userland-1888d833acac54bc81e87d2052385430472a65f6.zip |
bin/ls: make buildable against libbsd
Diffstat (limited to 'bin/ls/util.c')
-rw-r--r-- | bin/ls/util.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/bin/ls/util.c b/bin/ls/util.c index 61b0fda..e87c56b 100644 --- a/bin/ls/util.c +++ b/bin/ls/util.c @@ -32,25 +32,17 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> -#ifndef lint -#if 0 -static char sccsid[] = "@(#)util.c 8.5 (Berkeley) 4/28/95"; -#else -__RCSID("$NetBSD: util.c,v 1.34 2011/08/29 14:44:21 joerg Exp $"); -#endif -#endif /* not lint */ - #include <sys/types.h> #include <sys/stat.h> +#include <bsd/vis.h> + #include <err.h> #include <fts.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <vis.h> #include <wchar.h> #include <wctype.h> @@ -69,7 +61,7 @@ safe_print(const char *src) flags |= VIS_CSTYLE; len = strlen(src); - if (len != 0 && SIZE_T_MAX/len <= 4) { + if (len != 0 && UINT_MAX/len <= 4) { errx(EXIT_FAILURE, "%s: name too long", src); /* NOTREACHED */ } |