From e098dafde2cf87b72d8964dfe1bc749259266315 Mon Sep 17 00:00:00 2001 From: Antti Kantee Date: Mon, 22 Jun 2015 19:07:50 +0000 Subject: [PATCH] remove non-userspace namespace dependencies --- lib/librumprun_base/syscall_misc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/librumprun_base/syscall_misc.c b/lib/librumprun_base/syscall_misc.c index 6f281b512..142f9ed9a 100644 --- a/lib/librumprun_base/syscall_misc.c +++ b/lib/librumprun_base/syscall_misc.c @@ -48,11 +48,6 @@ #include #include -#include -#include - -#include - #ifdef RUMPRUN_MMAP_DEBUG #define MMAP_PRINTF(x) printf x #else @@ -65,6 +60,7 @@ mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off) void *v; ssize_t nn; int error; + long pagesize = sysconf(_SC_PAGESIZE); if (fd != -1 && prot != PROT_READ) { MMAP_PRINTF(("mmap: trying to r/w map a file. failing!\n")); @@ -72,7 +68,7 @@ mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off) return MAP_FAILED; } - if ((error = posix_memalign(&v, bmk_pagesize, len)) != 0) { + if ((error = posix_memalign(&v, pagesize, len)) != 0) { errno = error; return MAP_FAILED; }