about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-01-23 19:41:10 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-01-23 19:41:10 +0100
commitaba3e4a460388b64137d02b5635392987742a67a (patch)
tree2725b126aa905db992e061faebf4abe5da7e7aab /src
parentbc852aebeb9852801329f9576b4d5e3fa7df2efa (diff)
downloadbox64-aba3e4a460388b64137d02b5635392987742a67a.tar.gz
box64-aba3e4a460388b64137d02b5635392987742a67a.zip
Small improvment to MMAP32 managment
Diffstat (limited to 'src')
-rw-r--r--src/custommem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/custommem.c b/src/custommem.c
index b039c291..6e83a6b6 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -1577,7 +1577,7 @@ extern int running32bits;
 EXPORT void* mmap64(void *addr, unsigned long length, int prot, int flags, int fd, ssize_t offset)
 {
     void* ret;
-    if(running32bits && box64_mmap32 && !addr)
+    if(!addr && ((running32bits && box64_mmap32) || (flags&0x40)))
         ret = my_mmap64(NULL, addr, length, prot, flags | 0x40, fd, offset);
     else
         ret = internal_mmap(addr, length, prot, flags, fd, offset);