From b9103e62e4f001158fae3f68c19e931985512034 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 27 Jan 2020 10:59:19 +0000 Subject: [PATCH] src: optionally include xlocale.h header MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On macOS some definitions are in xlocale.h, instead of in locale.h. GNULIB hides this difference by making the latter include the former. Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- configure.ac | 1 + src/util/virgettext.c | 3 +++ src/util/virstring.c | 3 +++ tests/vshtabletest.c | 3 +++ 4 files changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index 141c0cc5d8..9fc2421173 100644 --- a/configure.ac +++ b/configure.ac @@ -399,6 +399,7 @@ AC_CHECK_HEADERS([\ sys/syscall.h \ sys/sysctl.h \ sys/ucred.h \ + xlocale.h \ ]) dnl Check whether endian provides handy macros. AC_CHECK_DECLS([htole64], [], [], [[#include ]]) diff --git a/src/util/virgettext.c b/src/util/virgettext.c index 7c12a5c142..8de8edb239 100644 --- a/src/util/virgettext.c +++ b/src/util/virgettext.c @@ -21,6 +21,9 @@ #include #include +#ifdef HAVE_XLOCALE_H +# include +#endif #include "configmake.h" #include "internal.h" diff --git a/src/util/virstring.c b/src/util/virstring.c index fe5c026d2c..e9e792f3bf 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -20,6 +20,9 @@ #include #include +#ifdef HAVE_XLOCALE_H +# include +#endif #include "virstring.h" #include "virthread.h" diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c index 96563ab8be..15369d8eb2 100644 --- a/tests/vshtabletest.c +++ b/tests/vshtabletest.c @@ -19,6 +19,9 @@ #include #include +#ifdef HAVE_XLOCALE_H +# include +#endif #include #include -- 2.39.5