Hurd has no MAP_NORESERVE so don't use it there

This commit is contained in:
Sebastian Dröge 2012-03-30 09:49:05 +02:00 committed by Jeremy Bícha
parent 0317aafd3f
commit baf2593852
2 changed files with 8 additions and 0 deletions

View file

@ -552,7 +552,11 @@ spawn_shm (const char *shm_path)
base = mmap (NULL, DATA_SIZE,
PROT_READ | PROT_WRITE,
#ifdef MAP_NORESERVE
MAP_SHARED | MAP_NORESERVE,
#else
MAP_SHARED,
#endif
fd, 0);
close (fd);

View file

@ -1347,7 +1347,11 @@ client_shm (const char *shm_path)
base = mmap (NULL, DATA_SIZE,
PROT_READ | PROT_WRITE,
#ifdef MAP_NORESERVE
MAP_SHARED | MAP_NORESERVE,
#else
MAP_SHARED,
#endif
fd, 0);
close (fd);