avisynth: adapt 239d02eff3ffe9f7d40caa21dde50fb4a0e94c24 to dlsym
authorStephen Hutchinson <qyot27@gmail.com>
Sat, 30 Mar 2019 21:46:32 +0000 (17:46 -0400)
committerGyan Doshi <ffmpeg@gyani.pro>
Sat, 4 May 2019 06:33:24 +0000 (12:03 +0530)
This commit was merged in a couple years ago as a no-op because we
had already switched from GetProcAddress to dlsym some time before
that.  However, not applying the actual cast causes warnings about
FARPROC and when attempting to build FFmpeg in MSVC with AviSynth-GCC
32-bit compatibility, those FARPROC warnings turn into FARPROC errors.

libavformat/avisynth.c

index 2181510..5dfe94a 100644 (file)
@@ -123,7 +123,8 @@ static av_cold int avisynth_load_library(void)
         return AVERROR_UNKNOWN;
 
 #define LOAD_AVS_FUNC(name, continue_on_fail)                          \
-        avs_library.name = dlsym(avs_library.library, #name);          \
+        avs_library.name = (name ## _func)                             \
+                           dlsym(avs_library.library, #name);          \
         if (!continue_on_fail && !avs_library.name)                    \
             goto fail;