From 06ec9c4746ebc1d3b613c1847e434bbd0b4407b4 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Wed, 11 Dec 2019 22:53:28 +0200 Subject: configure: Check for the SetDllDirectory and GetModuleHandle functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These functions aren't available when building for the restricted UWP/WinRT/WinStore API subsets. Normally when building in this mode, one is probably only building the libraries, but being able to build ffmpeg.exe still is useful (and a ffmpeg.exe targeting these API subsets still can be run e.g. in wine, for testing). Signed-off-by: Martin Storsjö --- fftools/cmdutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fftools/cmdutils.c') diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 84f98b7c04..fe903fa4da 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -119,7 +119,7 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v void init_dynload(void) { -#ifdef _WIN32 +#if HAVE_SETDLLDIRECTORY /* Calling SetDllDirectory with the empty string (but not NULL) removes the * current working directory from the DLL search path as a security pre-caution. */ SetDllDirectory(""); @@ -2039,7 +2039,7 @@ FILE *get_preset_file(char *filename, size_t filename_size, av_strlcpy(filename, preset_name, filename_size); f = fopen(filename, "r"); } else { -#ifdef _WIN32 +#if HAVE_GETMODULEHANDLE char datadir[MAX_PATH], *ls; base[2] = NULL; -- cgit v1.2.3