From 972a0693b219f1558405d6e1f207e08239def999 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 14 Oct 2024 22:47:51 +1000 Subject: [PATCH] Memmap: Compatibility with old libc without MAP_FIXED_NOREPLACE --- src/common/memmap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/memmap.cpp b/src/common/memmap.cpp index 3cea00b13..da6af3e0a 100644 --- a/src/common/memmap.cpp +++ b/src/common/memmap.cpp @@ -36,6 +36,11 @@ #include #endif +#if defined(__linux__) && !defined(MAP_FIXED_NOREPLACE) +// Compatibility with old libc. +#define MAP_FIXED_NOREPLACE 0x100000 +#endif + LOG_CHANNEL(MemMap); namespace MemMap {