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
(parent:
f3b3434
)
Branch HEAD
author
yangsheng
<yangsheng>
Tue, 9 Sep 2008 15:49:05 +0000
(15:49 +0000)
committer
yangsheng
<yangsheng>
Tue, 9 Sep 2008 15:49:05 +0000
(15:49 +0000)
b=16949
i=yury, deen
Add labs(x) as a inline function because absent since 2.6.22.
lustre/include/linux/lustre_compat25.h
patch
|
blob
|
history
diff --git
a/lustre/include/linux/lustre_compat25.h
b/lustre/include/linux/lustre_compat25.h
index
8d575a6
..
6c36ac1
100644
(file)
--- a/
lustre/include/linux/lustre_compat25.h
+++ b/
lustre/include/linux/lustre_compat25.h
@@
-608,5
+608,19
@@
static inline int ll_crypto_hmac(struct crypto_tfm *tfm,
#define cpu_to_node(cpu) 0
#endif
+#ifndef abs
+static inline int abs(int x)
+{
+ return (x < 0) ? -x : x;
+}
+#endif
+
+#ifndef labs
+static inline long labs(long x)
+{
+ return (x < 0) ? -x : x;
+}
+#endif
+
#endif /* __KERNEL__ */
#endif /* _COMPAT25_H */