aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorSergey Fedorov <vital.had@gmail.com>2023-11-01 16:53:46 +0800
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-01 23:29:15 +0900
commite3b4fe1b7695e22ce4970171de8514f0307dbce5 (patch)
tree5b0f5cd482fbc4d2297a149fb00de9f7e5f926a1 /thread_pthread.c
parentb77148ae9f74c46e645d9ce7387619e67109d935 (diff)
downloadruby-e3b4fe1b7695e22ce4970171de8514f0307dbce5.tar.gz
thread_pthread.c: unbreak 10.5 Intel by restoring accidentally deleted macro
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 4211074a74..eaf9229a06 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -2729,7 +2729,12 @@ native_thread_native_thread_id(rb_thread_t *target_th)
return INT2FIX(tid);
#elif defined(__APPLE__)
uint64_t tid;
-# if ((MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6) || \
+/* The first condition is needed because MAC_OS_X_VERSION_10_6
+ is not defined on 10.5, and while __POWERPC__ takes care of ppc/ppc64,
+ i386 will be broken without this. Note, 10.5 is supported with GCC upstream,
+ so it has C++17 and everything needed to build modern Ruby. */
+# if (!defined(MAC_OS_X_VERSION_10_6) || \
+ (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6) || \
defined(__POWERPC__) /* never defined for PowerPC platforms */)
const bool no_pthread_threadid_np = true;
# define NO_PTHREAD_MACH_THREAD_NP 1