[vlc-devel] [PATCH] lib: media: fix header include from MSVC

Thomas Guillem thomas at gllm.fr
Thu Oct 22 08:47:41 CEST 2020


---
 include/vlc/libvlc_media.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 904e2655612..0bd3aace07e 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -33,6 +33,12 @@ extern "C" {
 #  include <stdbool.h>
 # endif
 
+/* ssize_t, a signed version of size_t, is Posix only and not present in MSVC */
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
 /** \defgroup libvlc_media LibVLC media
  * \ingroup libvlc
  * @ref libvlc_media_t is an abstract representation of a playable media.
-- 
2.28.0



More information about the vlc-devel mailing list