From b27117c6584bbb80b14c589dfc840f658a36aaea Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 18 May 2008 16:20:39 +1000 Subject: [PATCH] Use new alignof package --- alloc/alloc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/alloc/alloc.c b/alloc/alloc.c index cc1b845b..f7a05e2d 100644 --- a/alloc/alloc.c +++ b/alloc/alloc.c @@ -6,16 +6,11 @@ #include #include "alloc.h" #include "build_assert/build_assert.h" +#include "alignof/alignof.h" #include "config.h" /* FIXME: We assume getpagesize() doesnt change. Remapping file with * different pagesize should still work. */ -#if HAVE_ALIGNOF -#define ALIGNOF(t) __alignof__(t) -#else -/* Alignment by measuring structure padding. */ -#define ALIGNOF(t) (sizeof(struct { char c; t _h; }) - 1 - sizeof(t)) -#endif /* FIXME: Doesn't handle non-page-aligned poolsize. */ -- 2.39.2