Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Weiman <mark.weiman@markzz.com>2021-04-16 23:45:21 -0400
committerAllan McRae <allan@archlinux.org>2021-04-19 17:08:40 +1000
commit207f0439eeecb505f74590af481236ec60c09876 (patch)
tree6575d40e466e14e9126be518f6c8cc6610a150ab
parentc294b7cb4c3a160cbbbe404baeaa23a3c8290a99 (diff)
meson.build: Fix detection of symbols
This patch changes the behavior of meson to define configuration options *only* when the symbol checked is present. Currently, it defines all of them in config.h whether the symbol exists or not and the code that looks for it doesn't check the macro's value, but whether it's defined. Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 579ff2ed..f76a647b 100644
--- a/meson.build
+++ b/meson.build
@@ -146,7 +146,9 @@ foreach sym : [
'tcflush',
]
have = cc.has_function(sym, args : '-D_GNU_SOURCE')
- conf.set10('HAVE_' + sym.to_upper(), have)
+ if have
+ conf.set10('HAVE_' + sym.to_upper(), have)
+ endif
endforeach
foreach member : [