Skip to content

Commit

Permalink
[runtime] Don't use clock_gettime in MacOS.
Browse files Browse the repository at this point in the history
Even though it's found during configure when targetting 10.7, it's not "really" available before versions 10.12 and it would crash with "lazy symbol binding failed".
  • Loading branch information
alexischr committed Mar 20, 2018
1 parent 9922d1a commit ff546b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mono/utils/mono-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ mono_msec_boottime (void)
{
gint64 retval = 0;

/* clock_gettime () is found by configure but its only present from ios 10 */
#if (defined(HAVE_CLOCK_MONOTONIC_COARSE) || defined(HAVE_CLOCK_MONOTONIC)) && !defined(TARGET_IOS)
/* clock_gettime () is found by configure but its only present from ios 10 and macos 10.12 */
#if (defined(HAVE_CLOCK_MONOTONIC_COARSE) || defined(HAVE_CLOCK_MONOTONIC)) && !(defined(TARGET_IOS) || defined(TARGET_OSX))
clockid_t clockType =
#if HAVE_CLOCK_MONOTONIC_COARSE
CLOCK_MONOTONIC_COARSE; /* good enough resolution, fastest speed */
Expand Down

0 comments on commit ff546b9

Please sign in to comment.