After
06ec9c4746ebc1d3b613c1847e434bbd0b4407b4 we 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 before
06ec9c4746ebc1d3b613c1847e434bbd0b4407b4,
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>
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("");
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;