diff options
author | Christian Wiese <chris@opensde.org> | 2014-04-12 00:56:37 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2014-04-12 11:27:20 +0200 |
commit | a4772aa046708acfafdf2957ed756d076821bba5 (patch) | |
tree | f0575a694f064b775a04226663edf3ab237b721d /built_in.h | |
parent | b8bb2e21ec3a685dde73565e822b5ff915cc316d (diff) |
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 <chris@opensde.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'built_in.h')
-rw-r--r-- | built_in.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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) |