summaryrefslogtreecommitdiff
path: root/missing/explicit_bzero.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-12 06:22:03 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-12 06:22:03 +0000
commitc0e208bc397f5a61611affe06ce4ce4bbdb47984 (patch)
treefa5291121469c300be18f2f6d0741140783e36aa /missing/explicit_bzero.c
parent239454dc8d3bec10e247ffc5b59c503ea90582bc (diff)
merge revision(s) 53493: [Backport #11978]
* include/ruby/missing.h (explicit_bzero_by_memset_s): remove inline implementation by memset_s, which needs a macro before including headers and can cause problems in extension libraries by the order of the macro and headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@53502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing/explicit_bzero.c')
-rw-r--r--missing/explicit_bzero.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c
index 2409deca20..a7ff9cb517 100644
--- a/missing/explicit_bzero.c
+++ b/missing/explicit_bzero.c
@@ -1,5 +1,12 @@
+#ifndef __STDC_WANT_LIB_EXT1__
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif
+
#include "ruby/missing.h"
#include <string.h>
+#ifdef HAVE_MEMSET_S
+# include <string.h>
+#endif
#ifdef _WIN32
#include <windows.h>