mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
33 lines
893 B
Diff
33 lines
893 B
Diff
--- libgimpbase/gimputils.c.orig 2023-02-22 03:56:19.000000000 +0800
|
|
+++ libgimpbase/gimputils.c 2023-06-15 07:20:18.000000000 +0800
|
|
@@ -27,6 +27,7 @@
|
|
|
|
#ifdef PLATFORM_OSX
|
|
#include <AppKit/AppKit.h>
|
|
+#include <AvailabilityMacros.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_EXECINFO_H
|
|
@@ -1199,10 +1200,19 @@
|
|
#if defined(G_OS_WIN32)
|
|
DWORD tid = GetCurrentThreadId ();
|
|
#elif defined(PLATFORM_OSX)
|
|
- uint64 tid64;
|
|
+ guint64 tid64;
|
|
long tid;
|
|
-
|
|
+#if (MAC_OS_X_VERSION_MAX_ALLOWED < 1060) || defined(__POWERPC__)
|
|
+ tid64 = pthread_mach_thread_np(pthread_self());
|
|
+#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
|
+ if (&pthread_threadid_np) {
|
|
+ pthread_threadid_np (NULL, &tid64);
|
|
+ } else {
|
|
+ tid64 = pthread_mach_thread_np(pthread_self());
|
|
+ }
|
|
+#else
|
|
pthread_threadid_np (NULL, &tid64);
|
|
+#endif
|
|
tid = (long) tid64;
|
|
#elif defined(SYS_gettid)
|
|
long tid = syscall (SYS_gettid);
|