diff options
author | Dmitri Vorobiev <dmitri.vorobiev@movial.com> | 2010-09-22 12:34:57 +0300 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-09-23 16:02:29 -0400 |
commit | 56777f3f675869806cd30bcd21a5b39d788507cb (patch) | |
tree | 28d323e64c65145aba7d0ac03a4c8699bfb17f76 /test | |
parent | 39524a4687391c68f4177e8671f4b2bd39e05850 (diff) |
Use <sys/mman.h> macros only when they are available
Not all systems are regular Unices, so let's be careful with the
mmap()-related stuff, which might be unavailable. This patch makes
sure that mmap() and friends is used only when the <sys/mman.h>
header is found.
Diffstat (limited to 'test')
-rw-r--r-- | test/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/utils.c b/test/utils.c index 448c296..2ed5051 100644 --- a/test/utils.c +++ b/test/utils.c @@ -218,7 +218,7 @@ typedef struct int n_bytes; } info_t; -#if defined(HAVE_MPROTECT) && defined(HAVE_GETPAGESIZE) +#if defined(HAVE_MPROTECT) && defined(HAVE_GETPAGESIZE) && defined(HAVE_SYS_MMAN_H) /* This is apparently necessary on at least OS X */ #ifndef MAP_ANONYMOUS |