summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2013-11-29 17:48:51 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-12-02 16:20:27 -0800
commit5b4ddbc11e84a22caefa655f4504e2999726458b (patch)
treef33fff07598506e28a161ba3eb39db98a173faed /configure.ac
parent8a81b83900ae3153a07f0824a57d0daed436fc18 (diff)
os: use posix_fallocate in creating sharable buffers
If posix_fallocate is available, use it instead of ftruncate. Unlike ftruncate, when posix_fallocate succeeds, it guarantees that you cannot run out of disk space, when later writing to the mmap()'ed file. With posix_fallocate, if os_create_anonymous_file() succeeds, the program cannot get a SIGBUS later from accessing this file via mmap. If there is insufficient disk space, the function fails and errno is set to ENOSPC. This is useful on systems, that limit the available buffer space by having XDG_RUNTIME_DIR on a small tmpfs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index bd8ff44e..2bf5f781 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,7 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
[[#include <time.h>]])
AC_CHECK_HEADERS([execinfo.h])
-AC_CHECK_FUNCS([mkostemp strchrnul initgroups])
+AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"