summaryrefslogtreecommitdiff
path: root/built_in.h
diff options
context:
space:
mode:
authorChristian Wiese <chris@opensde.org>2014-04-12 00:56:37 +0200
committerDaniel Borkmann <dborkman@redhat.com>2014-04-12 11:27:20 +0200
commita4772aa046708acfafdf2957ed756d076821bba5 (patch)
treef0575a694f064b775a04226663edf3ab237b721d /built_in.h
parentb8bb2e21ec3a685dde73565e822b5ff915cc316d (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.h8
1 files changed, 3 insertions, 5 deletions
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)