git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b277c7c
)
datapath: add rounddown() definition into compatibility code
author
Andy Zhou
<azhou@nicira.com>
Tue, 27 Aug 2013 23:19:53 +0000
(16:19 -0700)
committer
Jesse Gross
<jesse@nicira.com>
Tue, 27 Aug 2013 23:30:39 +0000
(16:30 -0700)
rounddown() was not available in older kenrel, such as kernel 2.6.32.61.
Add it to the compatibility code.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/linux/compat/include/linux/kernel.h
patch
|
blob
|
history
diff --git
a/datapath/linux/compat/include/linux/kernel.h
b/datapath/linux/compat/include/linux/kernel.h
index
fdd2005
..
6e248c5
100644
(file)
--- a/
datapath/linux/compat/include/linux/kernel.h
+++ b/
datapath/linux/compat/include/linux/kernel.h
@@
-87,4
+87,13
@@
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#endif
+#ifndef rounddown
+#define rounddown(x, y) ( \
+{ \
+ typeof(x) __x = (x); \
+ __x - (__x % (y)); \
+} \
+)
+#endif
+
#endif /* linux/kernel.h */