Older kernels didn't define DIV_ROUND_UP, so this provides a
backported version.

Signed-off-by: Jesse Gross <[email protected]>
---
 .../linux-2.6/compat-2.6/include/linux/kernel.h    |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/datapath/linux-2.6/compat-2.6/include/linux/kernel.h 
b/datapath/linux-2.6/compat-2.6/include/linux/kernel.h
index 2c2220b..4af8851 100644
--- a/datapath/linux-2.6/compat-2.6/include/linux/kernel.h
+++ b/datapath/linux-2.6/compat-2.6/include/linux/kernel.h
@@ -54,4 +54,8 @@
 #define SHRT_MIN       ((s16)(-SHRT_MAX - 1))
 #endif
 
+#ifndef DIV_ROUND_UP
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+#endif
+
 #endif /* linux/kernel.h */
-- 
1.7.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to