aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-11-09 19:34:42 +0100
committerGitHub <noreply@github.com>2018-11-09 19:34:42 +0100
commite70a55220344df6c4d786466a29a187229cf8145 (patch)
treed3a54f176f9908216e2dfbc9dfd423673a770c8d /util
parent0b5485cf8372a0e5c7aced47c9f37f0506be297e (diff)
parent753540335b8ff2e339402dce6500416333899416 (diff)
Merge pull request #1361 from sghctoma/fix-shm
Force ftruncate for shared memory objects on FreeBSD
Diffstat (limited to 'util')
-rw-r--r--util/shm.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/util/shm.c b/util/shm.c
index 3783e473..f7c7303e 100644
--- a/util/shm.c
+++ b/util/shm.c
@@ -42,17 +42,6 @@ int allocate_shm_file(size_t size) {
return -1;
}
-#ifdef WLR_HAS_POSIX_FALLOCATE
- int ret;
- do {
- ret = posix_fallocate(fd, 0, size);
- } while (ret == EINTR);
- if (ret != 0) {
- close(fd);
- errno = ret;
- return -1;
- }
-#else
int ret;
do {
ret = ftruncate(fd, size);
@@ -61,7 +50,6 @@ int allocate_shm_file(size_t size) {
close(fd);
return -1;
}
-#endif
return fd;
}