mirror of
https://github.com/BLAKE2/libb2
synced 2024-05-22 10:56:03 +02:00
Make secure_zero_memory() compile on HP-UX
This reinstantiates the portable approach to this function dropped in
b4b241a348
.
HP-UX does not have any of the fancy secure/explicit functions and the
compiler does not support the inline assembly syntax.
This commit is contained in:
parent
2c5142f12a
commit
30d45a17c5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue