Commit 76348754e32b45b2dd1e28a2cdac6d908fa68393

Ran Benita 2017-08-16T20:23:54

build: add missing configure function checks for test/interactive-wayland Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/configure.ac b/configure.ac
index e3369b0..56b0706 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ AS_IF([test ! -f "src/xkbcomp/parser.c" -a "x$YACC_INST" = x], [
 ])
 
 # Checks for library functions.
-AC_CHECK_FUNCS([eaccess euidaccess mmap])
+AC_CHECK_FUNCS([eaccess euidaccess mmap mkostemp posix_fallocate])
 
 AC_CHECK_FUNCS([secure_getenv __secure_getenv])
 AS_IF([test "x$ac_cv_func_secure_getenv" = xno -a \
diff --git a/meson.build b/meson.build
index cdcb5f6..452defc 100644
--- a/meson.build
+++ b/meson.build
@@ -84,6 +84,12 @@ endif
 if cc.has_header_symbol('sys/mman.h', 'mmap')
     configh_data.set('HAVE_MMAP', 1)
 endif
+if cc.has_header_symbol('stdlib.h', 'mkostemp', prefix: '#define _GNU_SOURCE')
+    configh_data.set('HAVE_MKOSTEMP', 1)
+endif
+if cc.has_header_symbol('fcntl.h', 'posix_fallocate', prefix: '#define _GNU_SOURCE')
+    configh_data.set('HAVE_POSIX_FALLOCATE', 1)
+endif
 if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix: '#define _GNU_SOURCE')
     configh_data.set('HAVE_SECURE_GETENV', 1)
 elif cc.has_header_symbol('stdlib.h', '__secure_getenv', prefix: '#define _GNU_SOURCE')