projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add check for __Static_assert() and asserts on struct sizes
[tinc]
/
src
/
meson.build
diff --git
a/src/meson.build
b/src/meson.build
index
e37c2db
..
b1796af
100644
(file)
--- a/
src/meson.build
+++ b/
src/meson.build
@@
-15,6
+15,14
@@
foreach attr : ['malloc', 'nonnull', 'warn_unused_result']
cc.has_function_attribute(attr)
endforeach
cc.has_function_attribute(attr)
endforeach
+if cc.compiles('''
+ _Static_assert(1, "ok");
+ int main(void) { return 0; }
+''')
+ cdata.set('HAVE_STATIC_ASSERT', 1,
+ description: 'C11 _Static_assert()')
+endif
+
check_headers = [
'alloca.h',
'arpa/inet.h',
check_headers = [
'alloca.h',
'arpa/inet.h',