summaryrefslogtreecommitdiff
path: root/missing/explicit_bzero.c
diff options
context:
space:
mode:
Diffstat (limited to 'missing/explicit_bzero.c')
-rw-r--r--missing/explicit_bzero.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c
index c1933bf..99b2e27 100644
--- a/missing/explicit_bzero.c
+++ b/missing/explicit_bzero.c
@@ -1,6 +1,10 @@
#include "ruby/missing.h"
#include <string.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
/*
*BSD have explicit_bzero().
Windows, OS-X have memset_s().
@@ -30,6 +34,8 @@ explicit_bzero(void *b, size_t len)
{
#ifdef HAVE_MEMSET_S
memset_s(b, len, 0, len);
+#elif defined SecureZeroMemory
+ SecureZeroMemory(b, len);
#else
{
/*