Skip to content

Commit 9bae3e4

Browse files
authored
Merge pull request #1411 from ychin/fix-clock_gettime-10.9-deployment
Fix legacy builds crashing in 10.9-10.11 by disabling clock_gettime
2 parents 3aa035b + aebdca4 commit 9bae3e4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/ci-macvim.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ jobs:
237237
- name: Check version
238238
run: |
239239
${VIM_BIN} --version
240+
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -c 'echo "\nprof_nsec:" .. has("prof_nsec") .. "\n"' -c quit
240241
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
241242
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
242243

src/os_mac.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@ typedef int clockid_t;
264264
# define CLOCK_MONOTONIC 1
265265
# endif
266266

267+
# if !defined(MAC_OS_X_VERSION_10_12) \
268+
|| (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12)
269+
// This happens when building on a newer machine for a min deployment lower
270+
// than 10.12. The build environment supports clock_gettime(), but the target
271+
// runtime doesn't.
272+
# undef HAVE_CLOCK_GETTIME
273+
# endif
274+
267275
struct itimerspec
268276
{
269277
struct timespec it_interval; // timer period

0 commit comments

Comments
 (0)