Subject: building release on sparc fails
To: None <current-users@netbsd.org>
From: KS <ks@ub.uni-mainz.de>
List: current-users
Date: 09/30/2007 23:29:19
Hi,

just got the following error doing "build.sh ... release" on sparc:

...
cc1: warnings being treated as errors
/u/NetBSD/src/sys/arch/sparc64/sparc64/machdep.c: In function 'dumpsys':
/u/NetBSD/src/sys/arch/sparc64/sparc64/machdep.c:774: warning: format '%6ld' expects type 'long int'
, but argument 2 has type '__uint64_t'
--- machdep.o ---
*** [machdep.o] Error code 1
1 error
...

With the following patch machdep.c compiles on sparc and sparc64:

--- /u/NetBSD/src/sys/arch/sparc64/sparc64/machdep.c.old	2007-09-30 19:03:37.000000000 +0200
+++ /u/NetBSD/src/sys/arch/sparc64/sparc64/machdep.c	2007-09-30 23:11:48.000000000 +0200
@@ -770,7 +770,7 @@
 
 			/* print out how many MBs we still have to dump */
 			if ((todo % (1024*1024)) == 0)
-				printf("\b\b\b\b\b\b\b%6ld ",
+				printf("\b\b\b\b\b\b\b%6" PRIu64 "d ",
 				    todo / (1024*1024));
 			pmap_kenter_pa(dumpspace, maddr, VM_PROT_READ);
 			pmap_update(pmap_kernel());


Kurt