Always return integers in mprotect()

This commit is contained in:
Pierre Pronchery 2019-03-27 02:52:43 +01:00
parent c51c10b78f
commit 461d26c140

View File

@ -52,7 +52,7 @@ int mprotect(void * addr, size_t length, int prot)
if((prot & (PROT_WRITE | PROT_EXEC)) == (PROT_WRITE | PROT_EXEC))
{
errno = EPERM;
return MAP_FAILED;
return -1;
}
/* FIXME really implement */
return 0;