From 39e988041eb82580f01f2b835acf2b0c2dca2326 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 31 May 2005 18:15:47 +0000 Subject: [PATCH 1/1] Branch b1_4 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lnet/include/libcfs/linux/kp30.h b/lnet/include/libcfs/linux/kp30.h index e588c45..a4e0b21 100644 --- a/lnet/include/libcfs/linux/kp30.h +++ b/lnet/include/libcfs/linux/kp30.h @@ -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" -- 1.8.3.1