mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
This should get rid of preloader warnings on old versions of macOS. Thanks to Gijs Vermeulen for help with debugging and testing this patch. Ideally, we would like to use vm_allocate, but since the preloader runs very early during the startup of the process, we don't have all required libc functions available. Also, we don't want to reimplement it ourself, which would be very unreliable in practice. For now, lets just use mincore() to check if there are any other pages mapped within the area, and then fallback to MAP_FIXED. (cherry picked from commit f254a73e6624a8603dbe310d9ee9b427145c8057)