]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
Merge branch 'vd/pthread-setspecific-g11-fix'
[thirdparty/git.git] / run-command.c
index 7ef5cc712a924a48f8ab94defa8d48125de0be0c..f40df01c77247c404062c9dfcbb9dddf534544e1 100644 (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;
 }