Skip to content

Commit 5fbd2fc

Browse files
committed
Merge branch 'vd/pthread-setspecific-g11-fix' into maint
One CI task based on Fedora image noticed a not-quite-kosher consturct recently, which has been corrected. * vd/pthread-setspecific-g11-fix: async_die_is_recursing: work around GCC v11.x issue on Fedora
2 parents 494cb27 + 4b540cf commit 5fbd2fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ static NORETURN void die_async(const char *err, va_list params)
10931093
static int async_die_is_recursing(void)
10941094
{
10951095
void *ret = pthread_getspecific(async_die_counter);
1096-
pthread_setspecific(async_die_counter, (void *)1);
1096+
pthread_setspecific(async_die_counter, &async_die_counter); /* set to any non-NULL valid pointer */
10971097
return ret != NULL;
10981098
}
10991099

0 commit comments

Comments
 (0)