From: Ian Jackson Date: Fri, 5 Oct 2018 21:43:34 +0000 (+0100) Subject: configure.ac: memshr_create: Detect and use from X-Git-Tag: chiark/234.4-1+devuan1.1+iwj1~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dc6031379ee6a09718b065387fbd3d6e5429a0d9;p=elogind.git 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 --- 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