diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-02-24 20:25:22 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-02-26 00:09:04 +1100 |
commit | a9004425a032d7a7141a5437cfabfd02431e2a74 (patch) | |
tree | b1f1f7914c2d65457ff313427049343153db6ef4 /openbsd-compat/bsd-misc.c | |
parent | 1a348359e4d2876203b5255941bae348557f4f54 (diff) |
Check for bzero and supply if needed.
Since explicit_bzero uses it via an indirect it needs to be a function
not just a macro.
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r-- | openbsd-compat/bsd-misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 9f6dc8af2..3e8f74b72 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c | |||
@@ -282,3 +282,11 @@ llabs(long long j) | |||
282 | return (j < 0 ? -j : j); | 282 | return (j < 0 ? -j : j); |
283 | } | 283 | } |
284 | #endif | 284 | #endif |
285 | |||
286 | #ifndef HAVE_BZERO | ||
287 | void | ||
288 | bzero(void *b, size_t n) | ||
289 | { | ||
290 | (void)memset(b, 0, n); | ||
291 | } | ||
292 | #endif | ||