[vlc-devel] [PATCH 1/3] lua: equalizer: use locale.h only if uselocale is available
Alexandre Janniaux
ajanni at videolabs.io
Wed May 20 16:41:32 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.
---
modules/lua/libs/equalizer.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/lua/libs/equalizer.c b/modules/lua/libs/equalizer.c
index 50f6df02487..92c10671c6c 100644
--- a/modules/lua/libs/equalizer.c
+++ b/modules/lua/libs/equalizer.c
@@ -41,11 +41,10 @@
#include "../libs.h"
#include "../vlc.h"
#include "../../audio_filter/equalizer_presets.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