mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-20 15:04:42 +00:00
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:
@@ -50,6 +50,8 @@ do { \
|
|||||||
((a) + _b - 1) & ~(_b - 1); \
|
((a) + _b - 1) & ~(_b - 1); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y))
|
||||||
|
|
||||||
#ifndef offsetof
|
#ifndef offsetof
|
||||||
#define offsetof(type, memb) ((unsigned long)&((type *)0)->memb)
|
#define offsetof(type, memb) ((unsigned long)&((type *)0)->memb)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user