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