diff --git a/src/misc.c b/src/misc.c index 4e50f584..d9651440 100644 --- a/src/misc.c +++ b/src/misc.c @@ -53,9 +53,11 @@ #include #endif -#ifdef HAVE_DECL_SECUREZEROMEMORY +#if defined(HAVE_DECL_SECUREZEROMEMORY) && HAVE_DECL_SECUREZEROMEMORY +#ifdef HAVE_WINDOWS_H #include #endif +#endif #include #include @@ -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);