From b7d55348abe54faee3ef0429ce030ed3e2ff1a52 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Thu, 8 Apr 2021 14:24:34 +0100 Subject: [PATCH] StormPort.h: Do not assume mmap support Do not assume mmap by default for the fallback platform, unless it's in a list of platforms that we know have mmap Upstream commit: https://github.com/ladislav-zezula/StormLib/commit/062868dcdfd8616c55405d42a065c7504fdcaf7a --- 3rdParty/StormLib/src/StormPort.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/3rdParty/StormLib/src/StormPort.h b/3rdParty/StormLib/src/StormPort.h index bd7947f94..ba78d7f2b 100644 --- a/3rdParty/StormLib/src/StormPort.h +++ b/3rdParty/StormLib/src/StormPort.h @@ -249,13 +249,12 @@ #endif //----------------------------------------------------------------------------- -// Assumption: If the platform is not defined, this must be Linux *grin* +// Assumption: If the platform is not defined, assume a Linux-like platform #if !defined(STORMLIB_PLATFORM_DEFINED) #include #include - #include #include #include #include @@ -273,7 +272,13 @@ #endif #define STORMLIB_LINUX - #define STORMLIB_HAS_MMAP // Indicate that we have mmap support + + // Platforms with mmap support + #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) + #include + #define STORMLIB_HAS_MMAP + #endif + #define STORMLIB_PLATFORM_DEFINED #endif