diff options
author | Jesse Gross <jesse@nicira.com> | 2011-04-14 13:10:09 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2011-04-27 12:29:06 -0700 |
commit | 530af29c41eb04d355e400871fa58f39002315de (patch) | |
tree | c06470e05b2a2097cb6035d85ecd4a364dc37ee1 /datapath | |
parent | e1ce3f2dccb027ef5ebe6035ab4f6a71de4ccf1c (diff) |
datapath: Backport DIV_ROUND_UP.
Older kernels didn't define DIV_ROUND_UP, so this provides a
backported version.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/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 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 */ |