--- ./src/debug.c_orig	2025-08-09 06:11:39.782131003 -0500
+++ ./src/debug.c	2025-08-09 06:12:51.426221710 -0500
@@ -70,7 +70,7 @@
 
 #ifdef HAVE_TLS
 #define FRAME_NR
-static __thread int frame_nr = 0;
+static __thread int frame_nr __attribute__((tls_model("local-dynamic"))) = 0;
 #endif
 
 void
