misc/139409: [patch] fix tools/regression/tmpfs compilation on amd64

Gleb Kurtsou gk at FreeBSD.org
Wed Oct 7 17:00:03 UTC 2009


>Number:         139409
>Category:       misc
>Synopsis:       [patch] fix tools/regression/tmpfs compilation on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 07 17:00:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Gleb Kurtsou
>Release:        
>Organization:
>Environment:
FreeBSD tops 9.0-CURRENT FreeBSD 9.0-CURRENT #7 r197735+8fb35f6: Sat Oct  3 21:22:17 EEST 2009     root at tops:/usr/obj/usr/freebsd-src/local/sys/TOPS  amd64
>Description:
Fix incorrect printf format string. Compilation fails on amd64
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/tools/regression/tmpfs/h_tools.c b/tools/regression/tmpfs/h_tools.c
index 1339060..6e8a236 100644
--- a/tools/regression/tmpfs/h_tools.c
+++ b/tools/regression/tmpfs/h_tools.c
@@ -50,6 +50,7 @@
 #include <sys/event.h>
 #include <sys/mount.h>
 #include <sys/statvfs.h>
+#include <sys/stdint.h>
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/un.h>
@@ -250,10 +251,10 @@ statvfs_main(int argc, char **argv)
 		return EXIT_FAILURE;
 	}
 
-	(void)printf("f_bsize=%llu\n", buf.f_bsize);
-	(void)printf("f_blocks=%llu\n", buf.f_blocks);
-	(void)printf("f_bfree=%llu\n", buf.f_bfree);
-	(void)printf("f_files=%llu\n", buf.f_files);
+	(void)printf("f_bsize=%ju\n", (uintmax_t)buf.f_bsize);
+	(void)printf("f_blocks=%ju\n", (uintmax_t)buf.f_blocks);
+	(void)printf("f_bfree=%ju\n", (uintmax_t)buf.f_bfree);
+	(void)printf("f_files=%ju\n", (uintmax_t)buf.f_files);
 
 	return EXIT_SUCCESS;
 }


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list