[vlc-devel] [PATCH 3/3] stream_out: rtsp: use locale.h only if uselocale is available

Alexandre Janniaux ajanni at videolabs.io
Wed May 20 16:41:34 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/stream_out/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
index 8d79803c8e0..57cd6215fb3 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -44,7 +44,7 @@
 #include <stdlib.h>
 #include <time.h>
 
-#ifndef _WIN32
+#if !defined(_WIN32) && defined(HAVE_USELOCALE)
 # include <locale.h>
 #endif
 #ifdef HAVE_XLOCALE_H
-- 
2.26.2



More information about the vlc-devel mailing list