summaryrefslogtreecommitdiffstats
path: root/src/include/openssl/type_check.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/openssl/type_check.h')
-rw-r--r--src/include/openssl/type_check.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/openssl/type_check.h b/src/include/openssl/type_check.h
index dd59151..674913a 100644
--- a/src/include/openssl/type_check.h
+++ b/src/include/openssl/type_check.h
@@ -76,8 +76,12 @@ extern "C" {
* was a pointer to |type|. */
#define CHECKED_PTR_OF(type, p) CHECKED_CAST(void*, type*, (p))
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#define OPENSSL_COMPILE_ASSERT(cond, msg) _Static_assert(cond, #msg)
+#else
#define OPENSSL_COMPILE_ASSERT(cond, msg) \
typedef char OPENSSL_COMPILE_ASSERT_##msg[((cond) ? 1 : -1)]
+#endif
#if defined(__cplusplus)