1
0
mirror of https://github.com/BLAKE2/libb2 synced 2024-11-23 00:32:03 +01:00

Merge pull request #26 from michael-o/hpux-secure-memory

Make secure_zero_memory() compile on HP-UX
This commit is contained in:
JP Aumasson 2019-05-28 16:00:13 +02:00 committed by GitHub
commit 37062e55cc
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -141,6 +141,9 @@ static inline void secure_zero_memory(void *v, size_t n)
{
#if defined(_WIN32) || defined(WIN32)
SecureZeroMemory(v, n);
#elif defined(__hpux)
static void *(*const volatile memset_v)(void *, int, size_t) = &memset;
memset_v(v, 0, n);
#else
// prioritize first the general C11 call
#if defined(HAVE_MEMSET_S)