From d7f67f4e5e233620dcbf7b24f4449cb27b1c3700 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Feb 2019 10:04:56 +1000 Subject: [PATCH] meson.build: define HAVE_LOCALE_H Regression introduced in 99bb0ee7cb35f7d7a932e7cf28885782bad17613, HAVE_LOCALE_H isn't defined by default, we need to set it manually. Reported-by: Pascal Kockwelp Signed-off-by: Peter Hutterer --- meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meson.build b/meson.build index 16b592a8..b4cb3331 100644 --- a/meson.build +++ b/meson.build @@ -97,6 +97,14 @@ if cc.has_header('xlocale.h') config_h.set('HAVE_XLOCALE_H', '1') endif +code = ''' +#include +void main(void) { newlocale(LC_NUMERIC_MASK, "C", (locale_t)0); } +''' +if cc.links(code, name : 'locale.h') + config_h.set('HAVE_LOCALE_H', '1') +endif + if not cc.has_header_symbol('sys/ptrace.h', 'PTRACE_ATTACH', prefix : prefix) config_h.set('PTRACE_ATTACH', 'PT_ATTACH') config_h.set('PTRACE_CONT', 'PT_CONTINUE')