Skip to content

Commit

Permalink
Merge pull request #1411 from ychin/fix-clock_gettime-10.9-deployment
Browse files Browse the repository at this point in the history
Fix legacy builds crashing in 10.9-10.11 by disabling clock_gettime
  • Loading branch information
ychin authored Jul 6, 2023
2 parents 3aa035b + aebdca4 commit 9bae3e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-macvim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ jobs:
- name: Check version
run: |
${VIM_BIN} --version
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -c 'echo "\nprof_nsec:" .. has("prof_nsec") .. "\n"' -c quit
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
Expand Down
8 changes: 8 additions & 0 deletions src/os_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ typedef int clockid_t;
# define CLOCK_MONOTONIC 1
# endif

# if !defined(MAC_OS_X_VERSION_10_12) \
|| (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12)
// This happens when building on a newer machine for a min deployment lower
// than 10.12. The build environment supports clock_gettime(), but the target
// runtime doesn't.
# undef HAVE_CLOCK_GETTIME
# endif

struct itimerspec
{
struct timespec it_interval; // timer period
Expand Down

0 comments on commit 9bae3e4

Please sign in to comment.