From dc6031379ee6a09718b065387fbd3d6e5429a0d9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 5 Oct 2018 22:43:34 +0100 Subject: [PATCH] configure.ac: memshr_create: Detect and use from Recent glibc versions do have a wrapper for this function. It is available via . So: * Add to the list of header checks. * Add a conditional include of to the configure test for memshr_create, so that it will pass if the function is there. * Add the same conditional include to missing.h, so that we get it declared when we build. Signed-off-by: Ian Jackson --- configure.ac | 4 ++++ src/basic/missing.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index c0ad243d2..9ec3390ff 100644 --- a/configure.ac +++ b/configure.ac @@ -358,6 +358,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) # ------------------------------------------------------------------------------ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) +AC_CHECK_HEADERS([sys/mman.h], [], []) AC_CHECK_HEADERS([linux/memfd.h], [], []) AC_CHECK_HEADERS([linux/vm_sockets.h], [], [], [#include ]) @@ -399,6 +400,9 @@ AC_CHECK_DECLS([ #include #include #include +#ifdef HAVE_SYS_MMAN_H +#include +#endif ]]) AC_CHECK_DECLS([getrandom], diff --git a/src/basic/missing.h b/src/basic/missing.h index c62c2db1c..e8508e770 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -55,6 +55,10 @@ #include #endif +#ifdef HAVE_SYS_MMAN_H +#include +#endif + #ifdef HAVE_LINUX_VM_SOCKETS_H #include #else -- 2.30.2