summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Anjo <ivo.anjo@datadoghq.com>2024-07-15 17:08:16 +0100
committerGitHub <noreply@github.com>2024-07-15 09:08:16 -0700
commit425e468d25a70740cef3ed676e9b82f7902e077a (patch)
treec163c7baacfcdede8995a8178ab552d5a61a2365
parent3427a1679a8ca30465c684ac28449f495bff8a22 (diff)
[Backport #20633] Fix the condition for `atomic_signal_fence` (#11166)
[Bug #20633] Fix the condition for `atomic_signal_fence` `AC_CHECK_DECLS` defines `HAVE_DECL_SYMBOL` to 1 if declared, 0 otherwise, not undefined. Co-authored-by: kimuraw (Wataru Kimura) <kimuraw@i.nifty.jp>
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 913fd86bb1..9a8911f731 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -396,7 +396,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