From 1284ea867254229e008d2b7bfea37194334036f5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Nov 2013 16:20:20 +0100 Subject: compat: specify MAP_ANON Signed-off-by: Stanislaw Halik --- compat/compat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compat') diff --git a/compat/compat.cpp b/compat/compat.cpp index 808a8645..1b530890 100644 --- a/compat/compat.cpp +++ b/compat/compat.cpp @@ -56,7 +56,7 @@ PortableLockedShm::PortableLockedShm(const char *shmName, const char* /*mutexNam fd = shm_open(shm_filename, O_RDWR | O_CREAT, 0600); if (ftruncate(fd, mapSize) == 0) - mem = mmap(NULL, mapSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0); + mem = mmap(NULL, mapSize, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, fd, (off_t)0); else mem = (void*) -1; } @@ -88,4 +88,4 @@ bool PortableLockedShm::success() #else return (void*) mem != NULL; #endif -} \ No newline at end of file +} -- cgit v1.2.3