Skip to content

Commit

Permalink
remove non-userspace namespace dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
anttikantee committed Jun 22, 2015
1 parent 945b099 commit e098daf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/librumprun_base/syscall_misc.c
Expand Up @@ -48,11 +48,6 @@
#include <time.h>
#include <unistd.h>

#include <bmk-core/core.h>
#include <bmk-core/sched.h>

#include <rump/rump.h>

#ifdef RUMPRUN_MMAP_DEBUG
#define MMAP_PRINTF(x) printf x
#else
Expand All @@ -65,14 +60,15 @@ 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"));
errno = ENOTSUP;
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;
}
Expand Down

0 comments on commit e098daf

Please sign in to comment.