Recent glibc versions do have a wrapper for this function. It is available via
<sys/mman.h>. So:
* Add <sys/mman.h> to the list of header checks.
* Add a conditional include of <sys/mman.h> 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 <ijackson@chiark.greenend.org.uk>
# ------------------------------------------------------------------------------
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 <sys/socket.h>])
#include <sched.h>
#include <string.h>
#include <linux/loop.h>
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
]])
AC_CHECK_DECLS([getrandom],
#include <linux/btrfs.h>
#endif
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
#ifdef HAVE_LINUX_VM_SOCKETS_H
#include <linux/vm_sockets.h>
#else