From a0e49fe80ba94071e4019edc5bbb128e0db1ec35 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sat, 12 Apr 2014 03:21:10 +0200 Subject: 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 Signed-off-by: Daniel Borkmann --- built_in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3-54-g00ecf