diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 03:52:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 03:52:20 +0000 |
commit | df294e94baee02ca2247b35ce32fb6b0ba26522c (patch) | |
tree | 8591e38fac3a58da2f9cfbd82ed6b3a8f3f4284c /missing | |
parent | 61654cc2f1c34a21cab37efebf148c4b4b1da92c (diff) | |
download | ruby-df294e94baee02ca2247b35ce32fb6b0ba26522c.tar.gz |
explicit_bzero.c: needs windows.h
* missing/explicit_bzero.c, random.c (explicit_bzero):
SecureZeroMemory() needs windows.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r-- | missing/explicit_bzero.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c index c1933bf1ff..99b2e2758c 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 { /* |