Просмотр исходного кода

Merge pull request #7707 from mono/fix-boottime-osx-10.7

[runtime] Don't use clock_gettime in MacOS.
Alexis Christoforides 7 лет назад
Родитель
Сommit
7cc78d08b0
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      mono/utils/mono-time.c

+ 2 - 2
mono/utils/mono-time.c

@@ -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 */