#254 Nonportable use of pthread_self() (musl libc)
Closed: Fixed by rharwood. Opened by mattst88.

From downstream: https://bugs.gentoo.org/713494

src/client/gpm_common.c: In function gpm_init_once:
src/client/gpm_common.c:55:35: error: invalid use of undefined type struct __pthread
   55 |     seedp = time(NULL) + getpid() + pthread_self();
      |                                   ^
src/client/gpm_common.c:55:11: warning: assignment to unsigned int from pthread_t {aka struct __pthread *} makes integer from pointer without a cast [-Wint-conversion]

pthread_self(3) says

Thread identifiers should be considered opaque: any attempt to use a thread ID other than in pthreads calls is nonportable and can lead to unspecified results.


I guess we should replace pthread_self() with gettid() ?

actually I guess we'll change this to call getrandom(), see no reason to use this construct...

Closed by #255.

Metadata Update from @rharwood:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata
Related Pull Requests