summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-11-04 19:24:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-04 19:24:20 (GMT)
commit5fbd2fc5997dfa4d4593a862fe729b1e7a89bcf8 (patch)
treecc13e418d3294ff306b8a111f08db5ee645d993c
parent494cb27e577f82b612eebe0a9a62aec13aeee4de (diff)
parent4b540cf913b8f528fadb9357530a34ea0dc09737 (diff)
downloadgit-5fbd2fc5997dfa4d4593a862fe729b1e7a89bcf8.zip
git-5fbd2fc5997dfa4d4593a862fe729b1e7a89bcf8.tar.gz
git-5fbd2fc5997dfa4d4593a862fe729b1e7a89bcf8.tar.bz2
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
-rw-r--r--run-command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c
index 2961f7e..f329391 100644
--- a/run-command.c
+++ b/run-command.c
@@ -1093,7 +1093,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;
}