mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-29 06:46:35 -04:00
MAP_UNINITIALIZED doesn't exists on FreeBSD
This commit is contained in:
parent
fc8e51a4dc
commit
a318fb4efa
1 changed files with 6 additions and 1 deletions
7
shm.c
7
shm.c
|
|
@ -309,7 +309,12 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie,
|
|||
|
||||
real_mmapped = mmap(
|
||||
NULL, memfd_size, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED | MAP_UNINITIALIZED, pool_fd, 0);
|
||||
#ifdef __linux__
|
||||
MAP_SHARED | MAP_UNINITIALIZED,
|
||||
#else
|
||||
MAP_SHARED,
|
||||
#endif
|
||||
pool_fd, 0);
|
||||
|
||||
if (real_mmapped == MAP_FAILED) {
|
||||
LOG_ERRNO("failed to mmap SHM backing memory file");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue