Use posix_fallocate when available

This commit is contained in:
emersion 2018-07-21 11:55:54 +01:00
parent ef0a6ea4d2
commit e02c486b60
2 changed files with 25 additions and 23 deletions

View file

@ -130,6 +130,10 @@ else
exclude_headers += 'xwayland.h'
endif
if cc.has_header_symbol('fcntl.h', 'posix_fallocate', prefix: '#define _POSIX_C_SOURCE 200112L')
conf_data.set('WLR_HAS_POSIX_FALLOCATE', true)
endif
includedir = get_option('includedir')
exclude_headers += 'meson.build'
install_subdir('include/wlr', install_dir: includedir, exclude_files: exclude_headers)