Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Tue, 31 May 2005 18:15:47 +0000 (18:15 +0000)
committeradilger <adilger>
Tue, 31 May 2005 18:15:47 +0000 (18:15 +0000)
On x86_64 the kernel declares __u64 as long long, but userspace uses long.
Fix LP*64 printf format macros to handle this difference to quiet warnings.

lnet/include/libcfs/linux/kp30.h

index e588c45..a4e0b21 100644 (file)
@@ -296,7 +296,8 @@ extern int  lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
 # define LP_POISON ((void *)(long)0x5a5a5a5a)
 #endif
 
-#if defined(__x86_64__)
+#if defined(__x86_64__) && defined(__KERNEL__)
+/* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
 # define LPU64 "%Lu"
 # define LPD64 "%Ld"
 # define LPX64 "%#Lx"