From: Matthias Clasen Date: Mon, 8 Jan 2007 12:59:05 +0000 (+0000) Subject: Don't use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is defined. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=cf7dcc4f38de65245382764daed6cb79f9be053a;p=dana%2Fcg-glib.git Don't use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is defined. 2007-01-08 Matthias Clasen * gthread/gthread-posix.c (g_thread_impl_init): Don't use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is defined. (#394150) svn path=/trunk/; revision=5230 --- diff --git a/ChangeLog b/ChangeLog index 1cf56556..070ab477 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-08 Matthias Clasen + + * gthread/gthread-posix.c (g_thread_impl_init): Don't + use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is + defined. (#394150) + 2007-01-07 Matthias Clasen Don't link glib against libpthread. (#393812) diff --git a/gthread/gthread-posix.c b/gthread/gthread-posix.c index 0d89e85d..d05165c6 100644 --- a/gthread/gthread-posix.c +++ b/gthread/gthread-posix.c @@ -119,9 +119,9 @@ static gulong g_thread_min_stack_size = 0; #define G_MUTEX_SIZE (sizeof (pthread_mutex_t)) -static gint posix_clock = 0; #if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK) #define USE_CLOCK_GETTIME 1 +static gint posix_clock = 0; #endif #if defined(_SC_THREAD_STACK_MIN) || defined (HAVE_PRIORITIES) || defined (USE_CLOCK_GETTIME) @@ -147,10 +147,12 @@ g_thread_impl_init(void) # endif #endif /* HAVE_PRIORITIES */ +#ifdef USE_CLOCK_GETTIME if (sysconf (_SC_MONOTONIC_CLOCK) >= 0) posix_clock = CLOCK_MONOTONIC; else posix_clock = CLOCK_REALTIME; +#endif } #endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */