Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
03b41aa
)
Branch b1_4
author
adilger
<adilger>
Tue, 31 May 2005 18:15:47 +0000
(18:15 +0000)
committer
adilger
<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
patch
|
blob
|
history
diff --git
a/lnet/include/libcfs/linux/kp30.h
b/lnet/include/libcfs/linux/kp30.h
index
e588c45
..
a4e0b21
100644
(file)
--- 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"