aboutsummaryrefslogtreecommitdiffstats
path: root/missing
diff options
context:
space:
mode:
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);
+}