aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-08-22 19:25:50 -0300
committerJames Almer <jamrial@gmail.com>2016-08-22 19:25:50 -0300
commitf4b8892ccbf08ea5b38177bb7ad042921d082eac (patch)
tree3d8aa31806f418aeffc33a8ac96e59ffe94662c0
parent4275b27a230008c41c63397871f173952723e2b2 (diff)
downloadffmpeg-f4b8892ccbf08ea5b38177bb7ad042921d082eac.tar.gz
cmdutils: check for SetDllDirectory() availability
It's only available on Windows XP or newer. Should fix compilation with mingw32 using the default OS target. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--cmdutils.c2
-rwxr-xr-xconfigure2
2 files changed, 3 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 6960f8c99c..a725e77531 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -109,7 +109,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("");
diff --git a/configure b/configure
index adb4c27e0f..5b069eb099 100755
--- a/configure
+++ b/configure
@@ -1935,6 +1935,7 @@ SYSTEM_FUNCS="
sched_getaffinity
SetConsoleTextAttribute
SetConsoleCtrlHandler
+ SetDllDirectory
setmode
setrlimit
Sleep
@@ -5475,6 +5476,7 @@ check_func_headers windows.h MapViewOfFile
check_func_headers windows.h PeekNamedPipe
check_func_headers windows.h SetConsoleTextAttribute
check_func_headers windows.h SetConsoleCtrlHandler
+check_func_headers windows.h SetDllDirectory
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
check_struct windows.h "CONDITION_VARIABLE" Ptr