From 06a523423abeb3993c2ea6f149f10230cda58e8a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 26 Nov 2017 00:11:56 +0100 Subject: [PATCH] Oh, the joy of compilers pretending to support C99, but that actually don't --- configure.ac | 1 + src/libsodium/sodium/utils.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ab79ca12..26f81d07 100644 --- a/configure.ac +++ b/configure.ac @@ -189,6 +189,7 @@ dnl Checks AC_PROG_CC_C99 AM_PROG_AS AC_USE_SYSTEM_EXTENSIONS +AC_C_VARARRAYS AC_CHECK_DEFINE([__native_client__], [NATIVECLIENT="yes"], []) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index b45f2325..91e79c77 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -128,7 +128,7 @@ sodium_stackzero(const size_t len) { #ifdef HAVE_ALLOCA sodium_memzero(alloca(len), len); -#elif __STDC_VERSION__ >= 199901L +#elif HAVE_C_VARARRAYS unsigned char fodder[len]; sodium_memzero(fodder, len); #endif