From 0b76011a45b421b1473e9be75e538d3ceadf1140 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 21 Mar 2025 15:37:51 -0400 Subject: Remove some less-supported code features like static initializers for variable-sized arrays --- stdlib/threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib/threads.c') diff --git a/stdlib/threads.c b/stdlib/threads.c index efd23546..9ad68c81 100644 --- a/stdlib/threads.c +++ b/stdlib/threads.c @@ -33,7 +33,7 @@ static void *run_thread(Closure_t *closure) public Thread_t Thread$new(Closure_t fn) { - Thread_t thread = new(pthread_t); + Thread_t thread = GC_MALLOC(sizeof(pthread_t)); Closure_t *closure = new(Closure_t, .fn=fn.fn, .userdata=fn.userdata); pthread_create(thread, NULL, (void*)run_thread, closure); return thread; -- cgit v1.2.3