From 34a3112bc836628dfe359b36104dff90530fae3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Sun, 4 Aug 2024 22:10:16 +0200 Subject: [PATCH] Fix function signature for pthread_create() gcc-14 is very picky --- flite.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flite.c b/flite.c index 7b100f2..50b1d7b 100644 --- a/flite.c +++ b/flite.c @@ -664,6 +664,12 @@ static void flite_thread(t_flite *x) { #endif return; } +static void*flite_do_thread(void *z) +{ + t_flite *x = (t_flite*)z; + flite_thread(x); + return 0; +} /*-------------------------------------------------------------------- * constructor @@ -693,7 +699,7 @@ static void *flite_new(t_symbol *ary) x->x_requestcode = IDLE; pthread_mutex_init(&x->x_mutex, 0); pthread_cond_init(&x->x_requestcondition, 0); - pthread_create(&x->x_tid, 0, flite_thread, x); + pthread_create(&x->x_tid, 0, flite_do_thread, x); return (void *)x; }