[PATCH] rt-tests, cyclictest - fix printf format for 32 bit systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The printf() format for a uint64_t is %l on a 64 bit system and %ll on
a 32 bit system.  Use the ugly but portable format descriptor.

Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxxxxx>
---
 src/cyclictest/cyclictest.c |    3 	2 +	1 -	0 !
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/src/cyclictest/cyclictest.c
===================================================================
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -24,6 +24,7 @@
 #include <time.h>
 #include <errno.h>
 #include <limits.h>
+#include <inttypes.h>
 #include <linux/unistd.h>
 
 #include <sys/prctl.h>
@@ -1561,7 +1562,7 @@ int main(int argc, char **argv)
 		print_tids(parameters, num_threads);
 		if (break_thread_id) {
 			printf("# Break thread: %d\n", break_thread_id);
-			printf("# Break value: %lu\n", break_thread_value);
+			printf("# Break value: %" PRIu64 "\n", break_thread_value);
 		}
 	}
 	

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux