Changeset View
Changeset View
Standalone View
Standalone View
lang/mono/files/patch-mono_utils_mono-threads.c
--- mono/utils/mono-threads.c.orig 2017-07-20 18:10:59 UTC | --- mono/utils/mono-threads.c.orig 2018-06-12 20:05:21 UTC | ||||
+++ mono/utils/mono-threads.c | +++ mono/utils/mono-threads.c | ||||
@@ -1243,7 +1243,7 @@ mono_thread_info_sleep (guint32 ms, gboo | @@ -1312,7 +1312,7 @@ mono_thread_info_sleep (guint32 ms, gboo | ||||
} while (1); | } while (1); | ||||
} else { | } else { | ||||
int ret; | int ret; | ||||
-#if defined (__linux__) && !defined(PLATFORM_ANDROID) | -#if defined (__linux__) && !defined(HOST_ANDROID) | ||||
+#if defined(HAVE_CLOCK_NANOSLEEP) && !defined(PLATFORM_ANDROID) | +#if defined (HAVE_CLOCK_NANOSLEEP) && !defined(HOST_ANDROID) | ||||
struct timespec start, target; | struct timespec start, target; | ||||
/* Use clock_nanosleep () to prevent time drifting problems when nanosleep () is interrupted by signals */ | /* Use clock_nanosleep () to prevent time drifting problems when nanosleep () is interrupted by signals */ | ||||
@@ -1342,7 +1342,7 @@ mono_thread_info_sleep (guint32 ms, gboo | |||||
memset (&rem, 0, sizeof (rem)); | |||||
ret = nanosleep (&req, &rem); | |||||
} while (ret != 0); | |||||
-#endif /* __linux__ */ | |||||
+#endif /* HAVE_CLOCK_NANOSLEEP */ | |||||
} | |||||
MONO_EXIT_GC_SAFE; |