From 72986e8ba350ced2d86904c704a2d8c756c3d14b Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 4 Sep 2021 10:18:16 +0200 Subject: Don't limit mmap on 47bits if wine is not detected --- src/wrapped/wrappedlibc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 1c08dc03..fdd2ca89 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -2034,7 +2034,7 @@ EXPORT void* my_mmap64(x64emu_t* emu, void *addr, unsigned long length, int prot addr = findBlockNearHint(addr, length); // is this the best way? ret = mmap64(addr, length, prot, flags, fd, offset); printf_log(LOG_INFO, " tried again with %p, got %p\n", addr, ret); - } else if((ret!=(void*)-1) && (old_addr==NULL) && ((uintptr_t)ret>0x7fffffffffffLL)) { + } else if((ret!=(void*)-1) && (old_addr==NULL) && (box64_wine) && ((uintptr_t)ret>0x7fffffffffffLL)) { printf_log(LOG_INFO, "Warning, mmap on 47bits didn't worked, ask %p, got %p ", addr, ret); munmap(ret, length); loadProtectionFromMap(); // reload map, because something went wrong previously -- cgit 1.4.1