openbsd-ports/devel/glib2/patches/patch-gthread_gthread-posix_c
2011-10-19 06:38:16 +00:00

27 lines
830 B
Plaintext

$OpenBSD: patch-gthread_gthread-posix_c,v 1.3 2011/10/19 06:38:16 robert Exp $
--- gthread/gthread-posix.c.orig Fri Oct 14 05:50:36 2011
+++ gthread/gthread-posix.c Tue Oct 18 22:35:58 2011
@@ -119,7 +119,7 @@ static gulong g_thread_min_stack_size = 0;
#define G_MUTEX_SIZE (sizeof (pthread_mutex_t))
-#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK)
+#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
#define USE_CLOCK_GETTIME 1
static gint posix_clock = 0;
#endif
@@ -148,10 +148,11 @@ g_thread_impl_init(void)
#endif /* HAVE_PRIORITIES */
#ifdef USE_CLOCK_GETTIME
- if (sysconf (_SC_MONOTONIC_CLOCK) >= 0)
+# ifdef CLOCK_MONOTONIC
posix_clock = CLOCK_MONOTONIC;
- else
+# else
posix_clock = CLOCK_REALTIME;
+# endif
#endif
}
#endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */