mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
wayland: unbreak build without memfd_create
New FreeBSD versions have memfd_create but other BSDs don't. bar/wayland.c:774:15: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pool_fd = memfd_create("yambar-wayland-shm-buffer-pool", MFD_CLOEXEC); ^ bar/wayland.c:774:62: error: use of undeclared identifier 'MFD_CLOEXEC' pool_fd = memfd_create("yambar-wayland-shm-buffer-pool", MFD_CLOEXEC); ^
This commit is contained in:
parent
f8e544ae05
commit
ec465ba3b3
2 changed files with 14 additions and 3 deletions
|
@ -12,6 +12,10 @@ plugs_as_libs = get_option('core-plugins-as-shared-libraries')
|
|||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
if cc.has_function('memfd_create')
|
||||
add_project_arguments('-DMEMFD_CREATE', language: 'c')
|
||||
endif
|
||||
|
||||
# Compute the relative path used by compiler invocations.
|
||||
source_root = meson.current_source_dir().split('/')
|
||||
build_root = meson.build_root().split('/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue