On Wed, Nov 11, 2020 at 05:24:42PM +0000, Jonathan Wakely wrote:
> --- a/libgcc/gthr-posix.h
> +++ b/libgcc/gthr-posix.h
> @@ -684,7 +684,14 @@ __gthread_equal (__gthread_t __t1, __gthread_t __t2)
>  static inline __gthread_t
>  __gthread_self (void)
>  {
> +#if __GLIBC_PREREQ(2, 27)

What if it is a non-glibc system where __GLIBC_PREREQ macro isn't defined?
I think you'd get then
error: missing binary operator before token "("
So I think you want
#if defined __GLIBC__ && defined __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 27)
  return pthread_self ();
#else
  return __gthrw_(pthread_self) ();
#else
  return __gthrw_(pthread_self) ();
#endif
or similar.

        Jakub

Reply via email to