Browse Source

Use new alignof package

Rusty Russell 18 years ago
parent
commit
b27117c658
1 changed files with 1 additions and 6 deletions
  1. 1 6
      alloc/alloc.c

+ 1 - 6
alloc/alloc.c

@@ -6,16 +6,11 @@
 #include <stdlib.h>
 #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. */