From 1a80b87409b72e76dece52ecc0f159ee654a30ec Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 22 Aug 2018 11:31:04 +0200 Subject: [PATCH] fix compilation on linux --- common/lib/memory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lib/memory.cpp b/common/lib/memory.cpp index 87d1432c0..8c0390b39 100644 --- a/common/lib/memory.cpp +++ b/common/lib/memory.cpp @@ -39,12 +39,12 @@ HostRam::HostRamAllocator::allocateBlock(size_t size) size &= size_t(~0xFFF); } - const int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS; - const int mmap_protection = PROT_READ | PROT_WRITE; - #ifdef __linux__ - mmap_flags |= MAP_32BIT; + const int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT; +#else + const int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS; #endif + const int mmap_protection = PROT_READ | PROT_WRITE; const void* addr = mmap(nullptr, size, mmap_protection, mmap_flags, 0, 0); if(addr == nullptr) {