mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
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:
parent
bcd19a8824
commit
b25e230df8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user