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

Steve Lhomme robux4 at ycbcr.xyz
Thu Oct 22 08:58:26 CEST 2020


On 2020-10-22 8:47, Thomas Guillem wrote:
> ---
>   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;

IMO we shouldn't use POSIX C defines in libvlc headers. It doesn't 
include our fixup (nor should it)

If we go the ifdef way, there are some compiler-specific defines in 
libvlc.h so this should probably go there.

> +#endif
> +
>   /** \defgroup libvlc_media LibVLC media
>    * \ingroup libvlc
>    * @ref libvlc_media_t is an abstract representation of a playable media.
> -- 
> 2.28.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list