Skip to content

Commit 3c76a91

Browse files
committed
LinuxEmulation: Fix bad compile time definition check
We don't want this to be compiled out if the definition doesn't exist. Actually define it in that case.
1 parent ee4ef0f commit 3c76a91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/Tools/LinuxEmulation/LinuxSyscalls/SyscallsSMCTracking.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ void SyscallHandler::TrackMremap(FEXCore::Core::InternalThreadState* Thread, uin
290290
VMATracking.SetUnsafe(CTX, OldResource, NewAddress, OldOffset, NewSize, OldFlags, OldProt);
291291
} else {
292292

293-
// MREMAP_DONTUNMAP is kernel 5.7+
294-
#ifdef MREMAP_DONTUNMAP
295-
if (!(flags & MREMAP_DONTUNMAP))
293+
#ifndef MREMAP_DONTUNMAP
294+
// MREMAP_DONTUNMAP is kernel 5.7+ and might not exist
295+
#define MREMAP_DONTUNMAP 4
296296
#endif
297-
{
297+
if (!(flags & MREMAP_DONTUNMAP)) {
298298
VMATracking.ClearUnsafe(CTX, OldAddress, OldSize, OldResource);
299299
}
300300

0 commit comments

Comments
 (0)