mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
cmdutils: Fix compilation on cygwin wrt SetDllDirectory and GetModuleHandle
After06ec9c4746we check for these functions in configure (which will succeed in cygwin), but cmdutils.c only includes windows.h if _WIN32 is defined (which it isn't in cygwin). Retain the old intent from before06ec9c4746, that these functions only would be used when _WIN32 is defined, while only using them if configure has agreed that they do exist. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
5bd001043d
commit
2dc2b11fba
1 changed files with 2 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
|
|||
|
||||
void init_dynload(void)
|
||||
{
|
||||
#if HAVE_SETDLLDIRECTORY
|
||||
#if HAVE_SETDLLDIRECTORY && defined(_WIN32)
|
||||
/* 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 {
|
||||
#if HAVE_GETMODULEHANDLE
|
||||
#if HAVE_GETMODULEHANDLE && defined(_WIN32)
|
||||
char datadir[MAX_PATH], *ls;
|
||||
base[2] = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue