Skip to content

Remove HAVE_MPROTECT cmake check

Summary

The posix function mprotect() is defined in the header sys/mman.h. Instead of implementing a cmake check for the header and whether a c source file compiles, this MR uses __has_include(<sys/mman.h>) instead.

Note, the cmake variable HAVE_MPROTECT is not defined anymore. Also the config.h variables HAVE_MPROTECT and HAVE_SYS_MMAN_H are not defined anymore. They are used exclusively inside debugallocator.hh and thus (for backwards compatibility) defined there if the corresponding header is found.

Merge request reports