Skip to content

Commit 21366a7

Browse files
committed
add Solaris support to Lib_Memzero0.c
(need to check whether this works with Illumos and then prepare a PR)
1 parent e55c99a commit 21366a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Modules/_hacl/Lib_Memzero0.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#endif
55
#endif
66

7+
#include "pyconfig.h"
8+
79
#ifdef _WIN32
810
#include <windows.h>
911
#endif
@@ -31,7 +33,7 @@
3133
#include <string.h>
3234
#endif
3335

34-
#if defined(__FreeBSD__) || defined(__NetBSD__)
36+
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__sun)
3537
#include <strings.h>
3638
#endif
3739

@@ -57,7 +59,7 @@ void Lib_Memzero0_memzero0(void *dst, uint64_t len) {
5759
SecureZeroMemory(dst, len_);
5860
#elif defined(__APPLE__) && defined(__MACH__) && defined(APPLE_HAS_MEMSET_S)
5961
memset_s(dst, len_, 0, len_);
60-
#elif (defined(__linux__) && !defined(LINUX_NO_EXPLICIT_BZERO)) || defined(__FreeBSD__) || defined(__OpenBSD__)
62+
#elif (defined(__linux__) && !defined(LINUX_NO_EXPLICIT_BZERO)) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__sun)
6163
explicit_bzero(dst, len_);
6264
#elif defined(__NetBSD__)
6365
explicit_memset(dst, 0, len_);

0 commit comments

Comments
 (0)