Copied from https://github.com/ansemjo/tinyssh-convert/blob/9028c16d99c6ab36aa3e51ac4f3c0b505ebfdff5/utilities.h --- bounce.h +++ bounce.h @@ -292,3 +292,7 @@ static inline void base64(char *dst, const byte *src, size_t len) { } dst[i] = '\0'; } + +/* volatile memset to try & avoid optmising it away */ +static void * (* const volatile volatile_memset)(void *, int, size_t) = memset; +#define memzero(ptr, size) volatile_memset(ptr, 0, size) --- configure +++ configure @@ -51,8 +51,7 @@ case "$(uname)" in defvar OPENSSL_BIN openssl exec_prefix /bin/openssl ;; (Darwin) - cflags -D__STDC_WANT_LIB_EXT1__=1 - cflags "-D'explicit_bzero(b,l)=memset_s((b),(l),0,(l))'" + cflags "-D'explicit_bzero(b,l)=memzero((b),(l))'" ldadd crypt '' config libtls defvar OPENSSL_BIN openssl exec_prefix /bin/openssl