[vlc-devel] [PATCH 2/3] charset: use locale.h only if uselocale is available
Alexandre Janniaux
ajanni at videolabs.io
Wed May 20 16:41:33 CEST 2020
Like is done in src/config/file.c. It prevents including locale.h in
case it doesn't provide what we need. Instead, vlc_fixup will be used
and uselocale/newlocale will be no-op.
---
src/text/charset.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/text/charset.c b/src/text/charset.c
index 0cb2322654e..65bb87071bf 100644
--- a/src/text/charset.c
+++ b/src/text/charset.c
@@ -29,10 +29,10 @@
#include <vlc_common.h>
-#if !defined _WIN32
-# include <locale.h>
-#else
+#if defined(_WIN32)
# include <windows.h>
+#elif defined(HAVE_USELOCALE)
+# include <locale.h>
#endif
#ifdef __APPLE__
--
2.26.2
More information about the vlc-devel
mailing list