ffmpeg | branch: release/2.8 | James Almer <[email protected]> | Mon Aug 22 
19:24:31 2016 -0300| [2f9bc30956fc20eb1e7256bfbbe361a5cafb68a7] | committer: 
Michael Niedermayer

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 <[email protected]>
Signed-off-by: James Almer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f9bc30956fc20eb1e7256bfbbe361a5cafb68a7
---

 cmdutils.c | 2 +-
 configure  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index bb4f49a..380ca1b 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -108,7 +108,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 ec4ff08..4cc45ad 100755
--- a/configure
+++ b/configure
@@ -1797,6 +1797,7 @@ SYSTEM_FUNCS="
     sched_getaffinity
     SetConsoleTextAttribute
     SetConsoleCtrlHandler
+    SetDllDirectory
     setmode
     setrlimit
     Sleep
@@ -5102,6 +5103,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

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to