diff options
Diffstat (limited to 'src/FileStream.cpp')
-rw-r--r-- | src/FileStream.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/FileStream.cpp b/src/FileStream.cpp index bfb5817..7268923 100644 --- a/src/FileStream.cpp +++ b/src/FileStream.cpp @@ -631,14 +631,17 @@ static bool BaseMap_Read( static void BaseMap_Close(TFileStream * pStream)
{
+
#ifdef STORMLIB_WINDOWS
+
if(pStream->Base.Map.pbFile != NULL)
UnmapViewOfFile(pStream->Base.Map.pbFile);
-#endif
-#if defined(STORMLIB_MAC) || defined(STORMLIB_LINUX)
+#elif defined(STORMLIB_HAS_MMAP)
+
if(pStream->Base.Map.pbFile != NULL)
munmap(pStream->Base.Map.pbFile, (size_t )pStream->Base.Map.FileSize);
+
#endif
pStream->Base.Map.pbFile = NULL;
|