$OpenBSD: patch-app_xm_c,v 1.2 2002/05/30 09:08:28 wcobb Exp $ --- app/xm.c.orig Mon May 20 10:21:08 2002 +++ app/xm.c Tue May 21 18:21:30 2002 @@ -765,7 +765,8 @@ xm_init_locks (XM *xm) for(i = 0; i < sizeof(xm->instruments) / sizeof(xm->instruments[0]); i++) { STInstrument *ins = &xm->instruments[i]; for(j = 0; j < sizeof(ins->samples) / sizeof(ins->samples[0]); j++) { - ins->samples[j].sample.lock = g_mutex_new(); + ins->samples[j].sample.lock = malloc(sizeof(pthread_mutex_t)); + pthread_mutex_init(ins->samples[j].sample.lock, NULL); } } } @@ -1094,7 +1095,9 @@ XM_Free (XM *xm) STInstrument *ins = &xm->instruments[i]; st_clean_instrument(ins, NULL); for(j = 0; j < sizeof(ins->samples) / sizeof(ins->samples[0]); j++) { - g_mutex_free(ins->samples[j].sample.lock); + pthread_mutex_destroy(ins->samples[j].sample.lock); + free(ins->samples[j].sample.lock); + ins->samples[j].sample.lock = NULL; } }