Skip to content

Instantly share code, notes, and snippets.

@danielabar
Forked from nicksieger/ruby-3.0.x.patch
Created October 18, 2024 13:39
Show Gist options
  • Save danielabar/b3ce9042451f72d2e29497b7c4ce303d to your computer and use it in GitHub Desktop.
Save danielabar/b3ce9042451f72d2e29497b7c4ce303d to your computer and use it in GitHub Desktop.
Patch to build ruby-3.0.x on Sequoia
--- ext/bigdecimal/bigdecimal.c.orig 2024-09-25 16:24:50
+++ ext/bigdecimal/bigdecimal.c 2024-09-25 16:25:15
@@ -65,7 +65,7 @@
static ID id_half;
/* MACRO's to guard objects from GC by keeping them in stack */
-#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
+#define ENTER(n) volatile VALUE vStack[n];int iStack=0
#define PUSH(x) (vStack[iStack++] = (VALUE)(x))
#define SAVE(p) PUSH((p)->obj)
#define GUARD_OBJ(p,y) ((p)=(y), SAVE(p))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment