Jinoh Kang (@iamahuman) commented about dlls/ntdll/unix/virtual.c:
return (vprot & VPROT_EXEC) && (vprot & (VPROT_WRITE | VPROT_WRITECOPY)); }
+#ifdef __APPLE__ +static void *mac_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + /* macOS since 10.15 fails to map files with PROT_EXEC + * (and will show the user an annoying warning if the file has a quarantine xattr set). + * But it works to map without PROT_EXEC and then use mprotect(). + */ + if (!(flags & MAP_ANON) && fd >= 0 && prot & PROT_EXEC) + { + void *ret = mmap(addr, len, prot & ~PROT_EXEC, flags, fd, offset); + + if (ret != MAP_FAILED && mprotect(ret, len, prot)) + WARN("failed to mprotect region: %d\n", errno);
```suggestion:-0+0 ERR("failed to mprotect region: %d\n", errno); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9126#note_117941