configure: adjust mmap()/mprotect() test

Avoid aggravating SELinux.
This commit is contained in:
Matthew Flatt 2013-02-08 11:15:28 +01:00
parent d73ae88220
commit 689b62a7a3
2 changed files with 2 additions and 2 deletions

2
src/configure vendored
View File

@ -5603,7 +5603,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <fcntl.h>
int main() {
void *p;
p = mmap(0, 2 << 16, PROT_READ | PROT_WRITE, MAP_PRIVATE, open("/dev/zero", O_RDWR), 0);
p = mmap(0, 2 << 16, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, open("/dev/zero", O_RDWR), 0);
mprotect(p, 2 << 16, PROT_READ | PROT_WRITE | PROT_EXEC);
return 0;
}

View File

@ -1021,7 +1021,7 @@ if test "${check_for_mprotect}" = "yes" ; then
[ #include <fcntl.h> ]
int main() {
void *p;
p = mmap(0, 2 << 16, PROT_READ | PROT_WRITE, MAP_PRIVATE, open("/dev/zero", O_RDWR), 0);
p = mmap(0, 2 << 16, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, open("/dev/zero", O_RDWR), 0);
mprotect(p, 2 << 16, PROT_READ | PROT_WRITE | PROT_EXEC);
return 0;
}, use_mprotect=yes, use_mprotect=no, use_mprotect=no)