summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkimuraw (Wataru Kimura) <kimuraw@i.nifty.jp>2024-07-14 10:36:35 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-07-14 10:36:35 +0900
commit7472fff7f1b5296fbfcde0e2b7411a1d87781f3f (patch)
treec382dd990a7d97dd49c9996d47ae6e5c79748d4d
parent84138f52b87628a6262224baf25278b583820392 (diff)
[Bug #20633] Fix the condition for `atomic_signal_fence`
`AC_CHECK_DECLS` defines `HAVE_DECL_SYMBOL` to 1 if declared, 0 otherwise, not undefined.
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 06419a85f7..cbc853c702 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -423,7 +423,7 @@ vm_push_frame(rb_execution_context_t *ec,
This is a no-op in all cases we've looked at (https://godbolt.org/z/3oxd1446K), but should guarantee it for all
future/untested compilers/platforms. */
- #ifdef HAVE_DECL_ATOMIC_SIGNAL_FENCE
+ #if defined HAVE_DECL_ATOMIC_SIGNAL_FENCE && HAVE_DECL_ATOMIC_SIGNAL_FENCE
atomic_signal_fence(memory_order_seq_cst);
#endif