Add DIV_ROUND_UP() to util.h

We're going to need this in some upcoming format.h changes.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2016-03-23 13:58:59 -07:00
parent a0a3ef9675
commit f3de3b1817

View File

@@ -50,6 +50,8 @@ do { \
((a) + _b - 1) & ~(_b - 1); \
})
#define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y))
#ifndef offsetof
#define offsetof(type, memb) ((unsigned long)&((type *)0)->memb)
#endif