Skip to content

Commit ff546b9

Browse files
committed
[runtime] Don't use clock_gettime in MacOS.
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".
1 parent 9922d1a commit ff546b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎mono/utils/mono-time.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ mono_msec_boottime (void)
150150
{
151151
gint64 retval = 0;
152152

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

0 commit comments

Comments
 (0)