diff --git Modules/clinic/posixmodule.c.h Modules/clinic/posixmodule.c.h
index c0d1d4d..7052678 100644
|
|
exit: |
4975 | 4975 | return return_value; |
4976 | 4976 | } |
4977 | 4977 | |
4978 | | #if defined(__APPLE__) |
| 4978 | #if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050 |
4979 | 4979 | |
4980 | 4980 | PyDoc_STRVAR(os__fcopyfile__doc__, |
4981 | 4981 | "_fcopyfile($module, infd, outfd, flags, /)\n" |
diff --git Modules/posixmodule.c Modules/posixmodule.c
index b09204d..78b2909 100644
|
|
corresponding Unix manual entries for more information on calls."); |
109 | 109 | #include <sys/sendfile.h> |
110 | 110 | #endif |
111 | 111 | |
112 | | #if defined(__APPLE__) |
| 112 | #if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050 |
113 | 113 | #include <copyfile.h> |
114 | 114 | #endif |
115 | 115 | |
… |
… |
done: |
9153 | 9153 | #endif /* HAVE_SENDFILE */ |
9154 | 9154 | |
9155 | 9155 | |
9156 | | #if defined(__APPLE__) |
| 9156 | #if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050 |
9157 | 9157 | /*[clinic input] |
9158 | 9158 | os._fcopyfile |
9159 | 9159 | |
… |
… |
all_ins(PyObject *m) |
14222 | 14222 | #endif |
14223 | 14223 | #endif |
14224 | 14224 | |
14225 | | #if defined(__APPLE__) |
| 14225 | #if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050 |
14226 | 14226 | if (PyModule_AddIntConstant(m, "_COPYFILE_DATA", COPYFILE_DATA)) return -1; |
14227 | 14227 | #endif |
14228 | 14228 | |
diff --git Python/thread_pthread.h Python/thread_pthread.h
index 5678b05..5cfdd17 100644
|
|
|
14 | 14 | |
15 | 15 | #if defined(__linux__) |
16 | 16 | # include <sys/syscall.h> /* syscall(SYS_gettid) */ |
| 17 | #elif defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED < 1060 |
| 18 | # include <sys/syscall.h> /* syscall(SYS_gettid) */ |
17 | 19 | #elif defined(__FreeBSD__) |
18 | 20 | # include <pthread_np.h> /* pthread_getthreadid_np() */ |
19 | 21 | #elif defined(__OpenBSD__) |
… |
… |
PyThread_get_thread_native_id(void) |
325 | 327 | { |
326 | 328 | if (!initialized) |
327 | 329 | PyThread_init_thread(); |
328 | | #ifdef __APPLE__ |
| 330 | #if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1060 |
329 | 331 | uint64_t native_id; |
330 | 332 | (void) pthread_threadid_np(NULL, &native_id); |
| 333 | #elif defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED < 1060 |
| 334 | pid_t native_id; |
| 335 | native_id = syscall(SYS_gettid); |
331 | 336 | #elif defined(__linux__) |
332 | 337 | pid_t native_id; |
333 | 338 | native_id = syscall(SYS_gettid); |