Commit b27117c6 authored by Rusty Russell's avatar Rusty Russell

Use new alignof package

parent 224a8f1f
......@@ -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. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment