summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-30 22:53:21 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-30 22:53:21 +0000
commitcae8e96bf5bf4baef7e2b74cfb692ebc8df508c8 (patch)
treee8e15286c18b16c62400364f0cbd33307bd35c89 /missing
parent487748fac8b43936bca1209c22fcd995a739aa93 (diff)
missing/explicit_bzero.c: Fixup r52806
Maybe kosaki had a better version, but CI failure emails are annoying. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/explicit_bzero.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c
new file mode 100644
index 0000000000..cb11bd6da1
--- /dev/null
+++ b/missing/explicit_bzero.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+/* prevent the compiler from optimizing away memset or bzero */
+void
+explicit_bzero(void *p, size_t n)
+{
+ memset(p, 0, n);
+}