Force ftruncate for shared mem. objects on FreeBSD

FreeBSD does not allow to use posix_fallocate on shared memory objects.
This commit is contained in:
sghctoma 2018-11-08 13:48:21 +01:00
parent bcd19a8824
commit b25e230df8
1 changed files with 1 additions and 1 deletions

View File

@ -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);