From: Jesse Gross Date: Thu, 14 Apr 2011 20:10:09 +0000 (-0700) Subject: datapath: Backport DIV_ROUND_UP. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=530af29c41eb04d355e400871fa58f39002315de;p=openvswitch datapath: Backport DIV_ROUND_UP. Older kernels didn't define DIV_ROUND_UP, so this provides a backported version. Signed-off-by: Jesse Gross --- 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 2c2220b9..4af88516 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 */