summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wiese <chris@opensde.org>2014-04-12 03:21:10 +0200
committerDaniel Borkmann <dborkman@redhat.com>2014-04-12 11:28:06 +0200
commita0e49fe80ba94071e4019edc5bbb128e0db1ec35 (patch)
tree49bfbb032b97ed1a553d58eceba9a2c22d99560f
parenta4772aa046708acfafdf2957ed756d076821bba5 (diff)
built_in: changed RUNTIME_PAGE_SIZE to use sysconf(_SC_PAGE_SIZE) instead of getpagesize()
getpagesize(2) is considered legacy and has been dropped with POSIX.1-2001. See discussion: 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>
-rw-r--r--built_in.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/built_in.h b/built_in.h
index c3ff2b5..54444fa 100644
--- a/built_in.h
+++ b/built_in.h
@@ -178,7 +178,7 @@ typedef uint8_t u8;
# define bug() assert(0)
#endif
-#define RUNTIME_PAGE_SIZE (getpagesize())
+#define RUNTIME_PAGE_SIZE (sysconf(_SC_PAGE_SIZE))
#define PAGE_MASK (~(RUNTIME_PAGE_SIZE - 1))
#define PAGE_ALIGN(addr) (((addr) + RUNTIME_PAGE_SIZE - 1) & PAGE_MASK)