Skip to content
Snippets Groups Projects
Commit ab4f2bc2 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

libvlc: fix API compatibility when using libvlc from MSVC


MSVC doesn't have ssize_t but it has SSIZE_T which should be similar.

clang-cl doesn't have any ssize_t in its header and defines _MSC_VER so it
should work as well.

Co-authored-by: default avatarMartin Finkel <martin@videolabs.io>
parent 4a887879
No related branches found
No related tags found
1 merge request!4498[3.0] libvlc: fix API compatibility when using libvlc from MSVC
Pipeline #409229 passed with stages
in 19 minutes and 59 seconds
......@@ -30,6 +30,12 @@
extern "C" {
# endif
#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.
......
......@@ -28,6 +28,12 @@
#include <vlc_access.h>
#include <vlc_plugin.h>
#ifdef _WIN32
#include <basetsd.h> // ensure MSVC compatibility
static_assert(sizeof(SSIZE_T) == sizeof(ssize_t),
"libvlc_media_read_cb type mismatch");
#endif
struct access_sys_t
{
void *opaque;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment