summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2022-02-09 13:52:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2022-02-09 14:21:32 +1000
commitbb2fd9d77798cb7a9d9b52125de81a981cbc20ec (patch)
treea49063e35ff30092c95c72e75a6713b0181202b3 /meson.build
parent485bb68b90e6a0a8069c04cfb69b48629847084c (diff)
downloadxf86-input-wacom-bb2fd9d77798cb7a9d9b52125de81a981cbc20ec.tar.gz
meson.build: pass -Wno-error=format to the asprintf check
meson generates a little program containing "return asprintf ();" But that call errors out, not because asprintf is missing but because on clang, -Werror includes -Wformat: error: format string missing [-Werror,-Wformat] The result is that meson things asprintf doesn't exist and we then try to link to Xasprintf which is implemented in the server only (and thus causes a linker error in the gwacom lib). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 8610a67..ac34055 100644
--- a/meson.build
+++ b/meson.build
@@ -103,7 +103,9 @@ config_h.set('PACKAGE_VERSION_MINOR', wacom_version[1])
config_h.set('PACKAGE_VERSION_PATCHLEVEL', wacom_version[2])
# shortcut to avoid linking to _Xasprintf if xorg-server isn't included
-if cc.has_function('asprintf', prefix: '#define _GNU_SOURCE')
+if cc.has_function('asprintf',
+ prefix: '#define _GNU_SOURCE',
+ args: ['-Wno-error=format'])
config_h.set10('HAVE_ASPRINTF', true)
endif