meson.build: define HAVE_LOCALE_H

Regression introduced in 99bb0ee7cb,
HAVE_LOCALE_H isn't defined by default, we need to set it manually.

Reported-by: Pascal Kockwelp
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-02-05 10:04:56 +10:00
parent e87780e803
commit d7f67f4e5e

View file

@ -97,6 +97,14 @@ if cc.has_header('xlocale.h')
config_h.set('HAVE_XLOCALE_H', '1')
endif
code = '''
#include <locale.h>
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')