summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2020-09-06 12:57:25 +0000
committermillert <millert@openbsd.org>2020-09-06 12:57:25 +0000
commit9f1f2f9e4445dc7ae169aed1ece7a3b339c4a6a4 (patch)
tree4663ceff875d73dabcbfb1385be2e83add0aaccc /include
parentOn tls_config_set_protocols() failure, include the output of (diff)
downloadwireguard-openbsd-9f1f2f9e4445dc7ae169aed1ece7a3b339c4a6a4.tar.xz
wireguard-openbsd-9f1f2f9e4445dc7ae169aed1ece7a3b339c4a6a4.zip
Use __STDC_VERSION__ instead of __ISO_C_VISIBLE to guard _Static_assert.
We need to test what the compiler supports, not what the C library provides. This prevents static_assert from being defined when compiling with the in-tree gcc (4.2.1) which does not support _Static_assert.
Diffstat (limited to 'include')
-rw-r--r--include/assert.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/assert.h b/include/assert.h
index c0623c91155..ccc8e33fb15 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: assert.h,v 1.14 2020/09/05 10:41:31 bentley Exp $ */
+/* $OpenBSD: assert.h,v 1.15 2020/09/06 12:57:25 millert Exp $ */
/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */
/*-
@@ -62,7 +62,7 @@
#ifndef _ASSERT_H_
#define _ASSERT_H_
-#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus)
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112
#define static_assert _Static_assert
#endif