diff options
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index 78dbbbf..3fb9124 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -126,10 +126,18 @@ #endif #if !defined(__cplusplus) -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #define alignas(x) __declspec(align(x)) #define alignof __alignof #else +// With the exception of MSVC, we require C11 to build the library. C11 is a +// prerequisite for improved refcounting performance. All our supported C +// compilers have long implemented C11 and made it default. The most likely +// cause of pre-C11 modes is stale -std=c99 or -std=gnu99 flags in build +// configuration. Such flags can be removed. +#if __STDC_VERSION__ < 201112L +#error "BoringSSL must be built in C11 mode or higher." +#endif #include <stdalign.h> #endif #endif |