diff options
author | Keith Packard <keithp@keithp.com> | 2014-10-09 14:01:21 +0200 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-10-09 14:09:09 +0200 |
commit | b63ea144a0439c54a3a147274afeeb115caced5a (patch) | |
tree | 061586cef6548383e9e45711dd6904e4d9409d46 /configure.ac | |
parent | 9c4f070e1304a3503cfab08f68573443025fc4c9 (diff) |
Use linux 3.17 memfd_create syscall when available
Linux 3.17 introduces a new anonymous memory allocation that returns a
file descriptor which we can pass around. Use this in preference to
creating a file in the filesystem where available.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ddf63dc..84b49de 100644 --- a/configure.ac +++ b/configure.ac @@ -89,6 +89,12 @@ AC_SUBST([XPROTO_CFLAGS]) CFLAGS="$CFLAGS $XPROTO_CFLAGS" +AC_CHECK_FUNCS(memfd_create) + +AC_CHECK_DECLS([__NR_memfd_create], [], [], [[#include <asm/unistd.h>]]) + +AC_CHECK_HEADERS([sys/memfd.h], [AC_DEFINE([HAVE_MEMFD_H], 1, [Has sys/memfd.h header])]) + AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]), [SYMBOL_VISIBILITY=$enableval], [SYMBOL_VISIBILITY=auto]) |