Added underscores to gettid(void) to remove name clash with system-provided gettid() in /usr/include/bits/unistd_ext.h that is not static
@@ -7272,21 +7272,21 @@ libdispatch_init(void)
#ifdef SYS_gettid
DISPATCH_ALWAYS_INLINE
static inline pid_t
-gettid(void)
+__gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
#elif defined(__FreeBSD__)
DISPATCH_ALWAYS_INLINE
static inline pid_t
-gettid(void)
+__gettid(void)
{
return (pid_t)pthread_getthreadid_np();
}
#elif defined(_WIN32)
DISPATCH_ALWAYS_INLINE
static inline DWORD
-gettid(void)
+__gettid(void)
{
return GetCurrentThreadId();
}
@@ -7401,7 +7401,7 @@ libdispatch_tsd_init(void)
#else
FlsSetValue(__dispatch_tsd_key, &__dispatch_tsd);
#endif // defined(_WIN32)
- __dispatch_tsd.tid = gettid();
+ __dispatch_tsd.tid = __gettid();
}
#endif
