Proper spelling of MAP_ANONYMOUS is MAP_ANON.

The former doesn't exist on BSD and the latter is available everywhere
AFAIK (checked Solaris and Linux).

You also might want to wrap that line ;).

Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2013-11-11 15:48:41 -08:00
parent fc84166e65
commit d7f9be0f85

View File

@ -121,7 +121,8 @@ busfault_sigaction(int sig, siginfo_t *info, void *param)
* /dev/zero over that area and keep going
*/
new_addr = mmap(busfault->addr, busfault->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE|MAP_FIXED, -1, 0);
new_addr = mmap(busfault->addr, busfault->size, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, 0);
if (new_addr == MAP_FAILED)
goto panic;