build: add configure check for having memfd_create() API
This commit is contained in:
@@ -19,6 +19,10 @@
|
|||||||
/* Gettext package */
|
/* Gettext package */
|
||||||
#mesondefine GETTEXT_PACKAGE
|
#mesondefine GETTEXT_PACKAGE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `memfd_create', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#mesondefine HAVE_DECL_MEMFD_CREATE
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `reallocarray', and to 0 if
|
/* Define to 1 if you have the declaration of `reallocarray', and to 0 if
|
||||||
you don't. */
|
you don't. */
|
||||||
#mesondefine HAVE_DECL_REALLOCARRAY
|
#mesondefine HAVE_DECL_REALLOCARRAY
|
||||||
|
@@ -81,6 +81,12 @@ AC_CHECK_DECLS([
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([
|
||||||
|
memfd_create],
|
||||||
|
[], [], [[
|
||||||
|
#include <sys/mman.h>
|
||||||
|
]])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sys/auxv.h)
|
AC_CHECK_HEADERS(sys/auxv.h)
|
||||||
|
|
||||||
AC_CHECK_DECLS([getrandom],
|
AC_CHECK_DECLS([getrandom],
|
||||||
|
@@ -115,6 +115,7 @@ config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv'))
|
|||||||
config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv'))
|
config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv'))
|
||||||
config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>'))
|
config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>'))
|
||||||
config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
|
config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
|
||||||
|
config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
|
||||||
|
|
||||||
# types
|
# types
|
||||||
config_h.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix: '#include <sys/types.h>'))
|
config_h.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix: '#include <sys/types.h>'))
|
||||||
|
Reference in New Issue
Block a user