[vlc-devel] [PATCH] fix lfind errors on windows
Martell Malone
martellmalone at gmail.com
Mon Nov 3 13:39:23 CET 2014
Apologies I should be using git am, here is a new patch.
>From 6986255c94efb86291545e7ac504440c6d2e812c Mon Sep 17 00:00:00 2001
> From: martell <martellmalone at gmail.com>
> Date: Mon, 3 Nov 2014 12:38:27 +0000
> Subject: [PATCH] lfind: msvcrt always use unsigned int* arg
> ---
> modules/access/dtv/access.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
> diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
> index 95b1dd7..433e65d 100644
> --- a/modules/access/dtv/access.c
> +++ b/modules/access/dtv/access.c
> @@ -727,8 +727,13 @@ static const char *var_InheritModulation
> (vlc_object_t *obj, const char *var)
> char *mod = var_InheritString (obj, var);
> if (mod == NULL)
> return "";
> -
> - size_t n = sizeof (modulation_vlc) / sizeof (modulation_vlc[0]);
> +
> +#ifdef __MINGW32__
> + unsigned int n;
> +#else
> + size_t_n;
> +#endif
> + n = sizeof (modulation_vlc) / sizeof (modulation_vlc[0]);
> const char *const *p = lfind (mod, modulation_vlc, &n, sizeof (mod),
> modcmp);
> if (p != NULL)
> {
> --
> 2.1.3
On Mon, Nov 3, 2014 at 12:30 PM, Martell Malone <martellmalone at gmail.com>
wrote:
> MS don't conform to the size_t argument and always use unsigned int even
> on x64
> This was applied to 2.2 branch but should also be able to go onto HEAD
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141103/c580f23b/attachment.html>
More information about the vlc-devel
mailing list