aboutsummaryrefslogtreecommitdiff
path: root/util/shm.c
diff options
context:
space:
mode:
authorsghctoma <sghctoma@gmail.com>2018-11-08 13:48:21 +0100
committersghctoma <sghctoma@gmail.com>2018-11-08 13:48:21 +0100
commitb25e230df828ded199d5648380a273ebbd3c5607 (patch)
tree915137ffbd2d74a92d7562a9d04f288fd6bf8516 /util/shm.c
parentbcd19a8824588adeafdae84114b83cac05a45065 (diff)
Force ftruncate for shared mem. objects on FreeBSD
FreeBSD does not allow to use posix_fallocate on shared memory objects.
Diffstat (limited to 'util/shm.c')
-rw-r--r--util/shm.c2
1 files changed, 1 insertions, 1 deletions
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);