[vlc-devel] [PATCH 3.0.x] contrib/sdl: fix #25006

Alexandre Janniaux ajanni at videolabs.io
Sat Nov 14 12:22:53 CET 2020


Hi,

Isn't it a private symbol? It's declared as .private_extern
as far as I read apple code.

If I remember what I've been told on this code, SDL uses
private API to be compatible with very early OSX version but
I'm not sure we want to fix its symbol loading at other
location than upstream. I'll probably let Marvin accepts or
rejects the patch though.

Regards,
--
Alexandre Janniaux
Videolabs

On Sat, Nov 14, 2020 at 06:44:48PM +0800, Zhao Zhili wrote:
> error: implicit declaration of function '_dyld_func_lookup' is invalid
> in C99 [-Werror,-Wimplicit-function-declaration]
> ---
>  contrib/src/sdl/missing_dyld_func_lookup.diff | 10 ++++++++++
>  contrib/src/sdl/rules.mak                     |  1 +
>  2 files changed, 11 insertions(+)
>  create mode 100644 contrib/src/sdl/missing_dyld_func_lookup.diff
>
> diff --git a/contrib/src/sdl/missing_dyld_func_lookup.diff b/contrib/src/sdl/missing_dyld_func_lookup.diff
> new file mode 100644
> index 0000000000..a80d0572ad
> --- /dev/null
> +++ b/contrib/src/sdl/missing_dyld_func_lookup.diff
> @@ -0,0 +1,10 @@
> +--- sdl/src/loadso/macosx/SDL_dlcompat.c.orig	2020-11-14 15:56:59.000000000 +0800
> ++++ sdl/src/loadso/macosx/SDL_dlcompat.c	2020-11-14 15:58:25.000000000 +0800
> +@@ -161,6 +161,7 @@ static void * SDL_OSX_dlsym(void * dl_re
> + #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
> + #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4
> + #endif
> ++extern int _dyld_func_lookup(const char* dyld_func_name, void **address);
> + /* These symbols will be looked for in dyld */
> + static const struct mach_header *(*dyld_NSAddImage) (const char *, unsigned long) = 0;
> + static int (*dyld_NSIsSymbolNameDefinedInImage) (const struct mach_header *, const char *) = 0;
> diff --git a/contrib/src/sdl/rules.mak b/contrib/src/sdl/rules.mak
> index 4b16cc90f3..ca7020ff49 100644
> --- a/contrib/src/sdl/rules.mak
> +++ b/contrib/src/sdl/rules.mak
> @@ -16,6 +16,7 @@ $(TARBALLS)/SDL-$(SDL_VERSION).tar.gz:
>  sdl: SDL-$(SDL_VERSION).tar.gz .sum-sdl
>  	$(UNPACK)
>  	$(APPLY) $(SRC)/sdl/direct_palette_ref.diff
> +	$(APPLY) $(SRC)/sdl/missing_dyld_func_lookup.diff
>  	$(UPDATE_AUTOCONFIG)
>  	$(MOVE)
>  	mv sdl/config.sub sdl/config.guess sdl/build-scripts
> --
> 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