summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/apple/apple_glx_log.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glx/apple/apple_glx_log.c b/src/glx/apple/apple_glx_log.c
index 9ebf666c9b4..5b9a865b610 100644
--- a/src/glx/apple/apple_glx_log.c
+++ b/src/glx/apple/apple_glx_log.c
@@ -76,7 +76,17 @@ void _apple_glx_vlog(int level, const char *file, const char *function,
uint64_t thread = 0;
if (pthread_is_threaded_np()) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+ thread = (uint64_t)(uintptr_t)pthread_self();
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ if (&pthread_threadid_np) {
+ pthread_threadid_np(NULL, &thread);
+ } else {
+ thread = (uint64_t)(uintptr_t)pthread_self();
+ }
+#else
pthread_threadid_np(NULL, &thread);
+#endif
}
if (diagnostic) {