diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | snappy-stubs-internal.h | 3 | ||||
-rw-r--r-- | snappy-test.h | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7081445..4e938d8 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AC_SUBST([LIBTOOL_DEPS]) AC_PROG_CXX AC_LANG([C++]) AC_C_BIGENDIAN -AC_CHECK_HEADERS([stdint.h stddef.h]) +AC_CHECK_HEADERS([stdint.h stddef.h sys/mman.h]) # Don't use AC_FUNC_MMAP, as it checks for mappings of already-mapped memory, # which we don't need (and does not exist on Windows). diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h index 28019e4..5a96378 100644 --- a/snappy-stubs-internal.h +++ b/snappy-stubs-internal.h @@ -23,7 +23,10 @@ #include <assert.h> #include <stdlib.h> #include <string.h> + +#ifdef HAVE_SYS_MMAN #include <sys/mman.h> +#endif #include "config.h" #include "snappy-stubs-public.h" diff --git a/snappy-test.h b/snappy-test.h index 1bcc69a..48e2215 100644 --- a/snappy-test.h +++ b/snappy-test.h @@ -21,6 +21,11 @@ #include <stdio.h> #include <stdarg.h> + +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + #include <sys/resource.h> #include <sys/time.h> |