diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/bsd-misc.c | 8 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.h | 4 |
2 files changed, 12 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 | ||
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 2cfd5dae6..bf5fad188 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h | |||
@@ -133,4 +133,8 @@ void warn(const char *, ...) __attribute__((format(printf, 1, 2))); | |||
133 | long long llabs(long long); | 133 | long long llabs(long long); |
134 | #endif | 134 | #endif |
135 | 135 | ||
136 | #ifndef HAVE_DECL_BZERO | ||
137 | void bzero(void *, size_t); | ||
138 | #endif | ||
139 | |||
136 | #endif /* _BSD_MISC_H */ | 140 | #endif /* _BSD_MISC_H */ |