summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2022-12-29 20:06:07 +0000
committerMarius Vlad <marius.vlad@collabora.com>2023-01-10 10:59:04 +0200
commitef87ad2237183dd9e6f19f7dfe05fdabedd12a5a (patch)
tree5a72dd34bcac1ae0bf6549cc22235893e59964aa /meson.build
parent35f04139c86442a3133fbfb60e176cc864175f77 (diff)
downloadweston-ef87ad2237183dd9e6f19f7dfe05fdabedd12a5a.tar.gz
build: Add unreachable()
unreachable() is used to hint to the compiler that a certain branch cannot ever be reached. The implementation is taken from Mesa. Signed-off-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build3
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 2d9da454..7f8fed3d 100644
--- a/meson.build
+++ b/meson.build
@@ -79,7 +79,8 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
endif
optional_libc_funcs = [
- 'mkostemp', 'strchrnul', 'initgroups', 'posix_fallocate', 'memfd_create'
+ 'mkostemp', 'strchrnul', 'initgroups', 'posix_fallocate',
+ 'memfd_create', 'unreachable',
]
foreach func : optional_libc_funcs
if cc.has_function(func)