From 464ba22f1e38d25402e5ec79a9b8d34a32df5a3f Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 18 Aug 2021 12:51:30 +1000 Subject: Check compiler for c99 declarations after code. The sntrup761 reference code contains c99-style declarations after code so don't try to build that if the compiler doesn't support it. --- defines.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'defines.h') diff --git a/defines.h b/defines.h index 7fff562c..857abb8b 100644 --- a/defines.h +++ b/defines.h @@ -901,10 +901,10 @@ struct winsize { #endif /* - * sntrup761 uses variable length arrays, only enable if the compiler - * supports them. + * sntrup761 uses variable length arrays and c99-style declarations after code, + * so only enable if the compiler supports them. */ -#ifdef VARIABLE_LENGTH_ARRAYS +#if defined(VARIABLE_LENGTH_ARRAYS) && defined(VARIABLE_DECLARATION_AFTER_CODE) # define USE_SNTRUP761X25519 1 #endif #endif /* _DEFINES_H */ -- cgit v1.2.1