Fix conditional check for HAVE_DECL_SECUREZEROMEMORY
"Unlike the other `AC_CHECK_*S' macros, when a symbol is not declared,
HAVE_DECL_symbol is defined to `0' instead of leaving HAVE_DECL_symbol
undeclared. When you are sure that the check was performed,
use HAVE_DECL_symbol in #if."
Source: autoconf documentation for AC_CHECK_DECLS.
#include <sys/time.h>
#endif
-#ifdef HAVE_DECL_SECUREZEROMEMORY
+#if defined(HAVE_DECL_SECUREZEROMEMORY) && HAVE_DECL_SECUREZEROMEMORY
+#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
+#endif
#include <stdio.h>
#include <errno.h>
@@ -689,7 +691,7 @@ static void * (* const volatile memset_libssh)(void *, int, size_t) = memset;
void _libssh2_explicit_zero(void *buf, size_t size)
{
-#ifdef HAVE_DECL_SECUREZEROMEMORY
+#if defined(HAVE_DECL_SECUREZEROMEMORY) && HAVE_DECL_SECUREZEROMEMORY
SecureZeroMemory(buf, size);
#elif defined(HAVE_MEMSET_S)
(void)memset_s(buf, size, 0, size);
