From a4772aa046708acfafdf2957ed756d076821bba5 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sat, 12 Apr 2014 00:56:37 +0200 Subject: built_in: changed to use RUNTIME_PAGE_SIZE instead of PAGE_SIZE References: https://github.com/netsniff-ng/netsniff-ng/commit/453f6eb9d79dd5aa2812ef956b22723f0a493086 https://github.com/netsniff-ng/netsniff-ng/pull/112 Signed-off-by: Christian Wiese Signed-off-by: Daniel Borkmann --- built_in.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'built_in.h') diff --git a/built_in.h b/built_in.h index 8dd1824..c3ff2b5 100644 --- a/built_in.h +++ b/built_in.h @@ -178,11 +178,9 @@ typedef uint8_t u8; # define bug() assert(0) #endif -#ifndef PAGE_SIZE -# define PAGE_SIZE (getpagesize()) -#endif -#define PAGE_MASK (~(PAGE_SIZE - 1)) -#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) +#define RUNTIME_PAGE_SIZE (getpagesize()) +#define PAGE_MASK (~(RUNTIME_PAGE_SIZE - 1)) +#define PAGE_ALIGN(addr) (((addr) + RUNTIME_PAGE_SIZE - 1) & PAGE_MASK) #if __BYTE_ORDER == __LITTLE_ENDIAN static inline uint64_t htonll(uint64_t x) -- cgit v1.2.3-54-g00ecf