1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-08 19:26:10 +02:00

Merge branch 'vd/pthread-setspecific-g11-fix'

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
This commit is contained in:
Junio C Hamano 2021-11-04 12:07:47 -07:00
commit a73934c320

View File

@ -1099,7 +1099,7 @@ static NORETURN void die_async(const char *err, va_list params)
static int async_die_is_recursing(void)
{
void *ret = pthread_getspecific(async_die_counter);
pthread_setspecific(async_die_counter, (void *)1);
pthread_setspecific(async_die_counter, &async_die_counter); /* set to any non-NULL valid pointer */
return ret != NULL;
}