clang 18 issues:
pthread_join_common.c:32:3: error: incompatible pointer types passing 'struct pthread **' to parameter of type 'void **' [-Werror,-Wincompatible-pointer-types]
32 | atomic_compare_exchange_weak_acquire (&arg, &self, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/atomic.h:188:39: note: expanded from macro 'atomic_compare_exchange_weak_acquire'
188 | __atomic_compare_exchange_n ((mem), (expected), (desired), 1,
Use a void * type instead.
Reviewed-by: Sam James <sam@gentoo.org>
/* If we already changed the waiter ID, reset it. The call cannot
fail for any reason but the thread not having done that yet so
there is no reason for a loop. */
- struct pthread *self = THREAD_SELF;
+ void *self = THREAD_SELF;
atomic_compare_exchange_weak_acquire (&arg, &self, NULL);
}