Skip to content

nine_debug: Make `tid` more type-correct

Fixes warning on non-glibc libcs:

nine_debug.c: In function ‘_nine_debug_printf’:
nine_debug.c:77:13: error: assignment to ‘long unsigned int’ from ‘pthread_t’ {aka ‘struct __pthread *’} makes integer from pointer without a cast [-Werror=int-conversion]
   77 |         tid = pthread_self();
      |             ^

Also makes it more consistent with include/c11/threads_posix.h, where we have typedef pthread_t thrd_t; and

static inline thrd_t
thrd_current(void)
{
    return pthread_self();
}

Merge request reports