summaryrefslogtreecommitdiff
path: root/lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h
blob: e447df2b46f755a28b05a1ecf550d950e45c87ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-include_ruby_internal_static__assert.h,v 1.1 2022/05/04 16:44:53 taca Exp $

Add the way to stop using static_assert.

--- include/ruby/internal/static_assert.h.orig	2022-04-12 11:11:15.000000000 +0000
+++ include/ruby/internal/static_assert.h
@@ -50,7 +50,7 @@
 #elif defined(__STDC_VERSION__) && RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
 # define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
 
-#elif defined(static_assert)
+#elif defined(static_assert) && !defined(RB_AVOID_STATIC_ASSERT)
 # /* Take <assert.h> definition */
 # define RBIMPL_STATIC_ASSERT0 static_assert
 #endif