configure.ac: check for sys/mman.h header file

Include "sys/mman.h" header file in the list of the AC_CHECK_HEADERS
macro to make sure the existence, and use HAVE_SYS_MMAN_H macro
instead of HAVE_MMAP for the test whether to include the header file.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
Ryusuke Konishi 2016-09-21 07:00:56 +09:00
parent 823f4234c0
commit 98dd99c388
2 changed files with 4 additions and 4 deletions

View File

@ -90,8 +90,8 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ctype.h err.h fcntl.h grp.h libintl.h limits.h \
linux/magic.h linux/types.h locale.h mntent.h mqueue.h \
paths.h poll.h pwd.h semaphore.h stdint.h stdlib.h string.h \
strings.h sys/ioctl.h sys/mount.h sys/time.h syslog.h \
time.h unistd.h])
strings.h sys/ioctl.h sys/mman.h sys/mount.h sys/time.h \
syslog.h time.h unistd.h])
# Check /etc/mtab
mtab_type=''

View File

@ -54,9 +54,9 @@
#include <limits.h>
#endif /* HAVE_LIMITS_H */
#if HAVE_MMAP
#if HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif /* HAVE_MMAP */
#endif /* HAVE_SYS_MMAN_H */
#if HAVE_TIME_H
#include <time.h>