$OpenBSD: patch-gthread_gthread-posix_c,v 1.4 2011/10/19 06:42:44 robert Exp $
--- gthread/gthread-posix.c.orig	Wed Oct 19 08:41:50 2011
+++ gthread/gthread-posix.c	Wed Oct 19 08:42:24 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 */
