From 0e03784e47d8ba630dcfc96a5fb03bad4ada0e78 Mon Sep 17 00:00:00 2001 From: Greg V Date: Tue, 10 Jul 2018 13:56:18 +0300 Subject: [PATCH] Fix include portablity (xlocale, stdlib) --- meson.build | 4 ++++ src/libinput-util.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/meson.build b/meson.build index 9ff1711..e3d81da 100644 --- a/meson.build +++ b/meson.build @@ -87,6 +87,10 @@ if cc.has_header_symbol('dirent.h', 'versionsort', prefix : prefix) config_h.set('HAVE_VERSIONSORT', '1') endif +if cc.has_header('xlocale.h') + config_h.set('HAVE_XLOCALE_H', '1') +endif + # Dependencies pkgconfig = import('pkgconfig') dep_udev = dependency('libudev') diff --git a/src/libinput-util.h b/src/libinput-util.h index c68b888..85166ca 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -31,11 +31,15 @@ #include #include #include +#ifdef HAVE_XLOCALE_H +#include +#endif #include #include #include #include #include +#include #include #include #include -- 2.7.4