diff options
author | imp <imp@FreeBSD.org> | 2011-05-12 17:02:56 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2011-05-12 17:02:56 +0000 |
commit | cf0af33527e27c8e66d344f49277c026a8218b93 (patch) | |
tree | 19805bd8ce1c483a0ebefd43bcadb32c6d93b3ea | |
parent | 71da39e09ceda78b4ab4d42e670f704f3fa61097 (diff) | |
download | FreeBSD-src-cf0af33527e27c8e66d344f49277c026a8218b93.zip FreeBSD-src-cf0af33527e27c8e66d344f49277c026a8218b93.tar.gz |
Fix printf int mismatch on 32-bit architectures...
-rw-r--r-- | usr.bin/fstat/fstat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 9d057e5..f870210 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include <libprocstat.h> #include <limits.h> #include <pwd.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -452,7 +453,7 @@ print_vnode_info(struct procstat *procstat, struct filestat *fst) else { strmode(vn.vn_mode, mode); } - (void)printf(" %6ld %10s", vn.vn_fileid, mode); + (void)printf(" %6jd %10s", (intmax_t)vn.vn_fileid, mode); if (vn.vn_type == PS_FST_VTYPE_VBLK || vn.vn_type == PS_FST_VTYPE_VCHR) { if (nflg || !*vn.vn_devname) @@ -461,7 +462,7 @@ print_vnode_info(struct procstat *procstat, struct filestat *fst) printf(" %6s", vn.vn_devname); } } else - printf(" %6lu", vn.vn_size); + printf(" %6ju", (intmax_t)vn.vn_size); print_access_flags(fst->fs_fflags); } |