diff options
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 9c99c67d67..3d932db5e3 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -493,6 +493,10 @@ do { \ #endif +#ifndef LACKS_UNISTD_H +# include <unistd.h> +#endif + /* Define HAVE_MMAP to optionally make malloc() use mmap() to allocate very large blocks. These will be returned to the @@ -500,7 +504,9 @@ do { \ */ #ifndef HAVE_MMAP -#define HAVE_MMAP 1 +# ifdef _POSIX_MAPPED_FILES +# define HAVE_MMAP 1 +# endif #endif /* @@ -541,10 +547,6 @@ do { \ bsd/gnu getpagesize.h */ -#ifndef LACKS_UNISTD_H -# include <unistd.h> -#endif - #ifndef malloc_getpagesize # ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ # ifndef _SC_PAGE_SIZE |