Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2011 17:02:56 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221816 - head/usr.bin/fstat
Message-ID:  <201105121702.p4CH2u1w045627@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu May 12 17:02:56 2011
New Revision: 221816
URL: http://svn.freebsd.org/changeset/base/221816

Log:
  Fix printf int mismatch on 32-bit architectures...

Modified:
  head/usr.bin/fstat/fstat.c

Modified: head/usr.bin/fstat/fstat.c
==============================================================================
--- head/usr.bin/fstat/fstat.c	Thu May 12 15:21:59 2011	(r221815)
+++ head/usr.bin/fstat/fstat.c	Thu May 12 17:02:56 2011	(r221816)
@@ -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 *procst
 	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 *procst
 			printf(" %6s", vn.vn_devname);
 		}
 	} else
-		printf(" %6lu", vn.vn_size);
+		printf(" %6ju", (intmax_t)vn.vn_size);
 	print_access_flags(fst->fs_fflags);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105121702.p4CH2u1w045627>