From b25e230df828ded199d5648380a273ebbd3c5607 Mon Sep 17 00:00:00 2001 From: sghctoma Date: Thu, 8 Nov 2018 13:48:21 +0100 Subject: Force ftruncate for shared mem. objects on FreeBSD FreeBSD does not allow to use posix_fallocate on shared memory objects. --- util/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/shm.c b/util/shm.c index 3783e473..b4e8d087 100644 --- a/util/shm.c +++ b/util/shm.c @@ -42,7 +42,7 @@ int allocate_shm_file(size_t size) { return -1; } -#ifdef WLR_HAS_POSIX_FALLOCATE +#if defined(WLR_HAS_POSIX_FALLOCATE) && !defined(__FreeBSD__) int ret; do { ret = posix_fallocate(fd, 0, size); -- cgit v1.2.3