[vlc-devel] [PATCH] Fix gai_strerror on Unicode

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:27 CET 2016


From: Jean-Baptiste Kempf <jb at videolan.org>

---
 include/vlc_network.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/vlc_network.h b/include/vlc_network.h
index 28a9fa6..bce3a2a 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -199,7 +199,12 @@ VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const char *psz_fmt,
 
 #ifdef _WIN32
 # undef gai_strerror
-# define gai_strerror gai_strerrorA
+# ifdef UNICODE
+#   include <vlc_charset.h>
+#   define gai_strerror(a) FromWide(gai_strerrorW)
+# else
+#   define gai_strerror gai_strerrorA
+# endif
 #endif
 
 #ifdef __OS2__
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list