add sys/mman.h shim to define MAP_ANON if needed

thanks to kinichiro for pointing this out

ok deraadt@ beck@
This commit is contained in:
Brent Cook 2014-07-29 07:39:23 -05:00
parent 983103b0db
commit af705b3f7d
2 changed files with 15 additions and 0 deletions

View File

@ -7,4 +7,5 @@ noinst_HEADERS += stdlib.h
noinst_HEADERS += string.h
noinst_HEADERS += unistd.h
noinst_HEADERS += machine/endian.h
noinst_HEADERS += sys/mman.h
noinst_HEADERS += sys/types.h

14
include/sys/mman.h Normal file
View File

@ -0,0 +1,14 @@
#include_next <sys/mman.h>
#ifndef LIBCRYPTOCOMPAT_MMAN_H
#define LIBCRYPTOCOMPAT_MMAN_H
#ifndef MAP_ANONYMOUS
#ifdef MAP_ANON
#define MAP_ANONYMOUS MAP_ANON
#else
#error "System does not support mapping anonymous pages?"
#endif
#endif
#endif