Commit Diff


commit - b5c5e56dce958046e26bea8b2449c806e9cdd642
commit + beada781bf1465d95197dafcbb55f57c575ab1a8
blob - /dev/null
blob + a18731b8fbe9292251dae2e3d8bfff432004aedc (mode 644)
--- /dev/null
+++ compat/explicit_bzero.c
@@ -0,0 +1,14 @@
+/*
+ * Public domain.
+ * Written by Matthew Dempsky.
+ */
+
+#include "compat.h"
+
+#include <string.h>
+
+void
+explicit_bzero(void *buf, size_t len)
+{
+	memset(buf, 0, len);
+}
blob - 18775ae4d232f794104fca99e0df160b085ec419
blob + b8f98cb5c6e5fe7790cea23b8d7520b9b71db12e
--- compat.h
+++ compat.h
@@ -70,6 +70,10 @@ void		 warnx(int, const char*, ...);
 # include <err.h>
 #endif
 
+#ifndef HAVE_EXPLICIT_BZERO
+void		 explicit_bzero(void *, size_t);
+#endif
+
 #ifndef HAVE_FREEZERO
 void		 freezero(void*, size_t);
 #endif
blob - 2f11d8c301b3c0d0919551f3c356150037cef3ef
blob + ea6f0e16aa6543c1cd11b03e7a56657b167c814d
--- configure.ac
+++ configure.ac
@@ -11,6 +11,7 @@ PKG_PROG_PKG_CONFIG
 AC_REPLACE_FUNCS([
 	asprintf \
 	err \
+	explicit_bzero \
 	freezero \
 	getdtablecount \
 	getdtablesize \