datapath: add rounddown() definition into compatibility code
[sliver-openvswitch.git] / datapath / linux / compat / include / linux / kernel.h
index fdd2005..6e248c5 100644 (file)
 #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 */