blob: 0884ba092eb6a87624a0b8376720e4507144dfbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-ai,v 1.9 2006/10/03 02:31:46 dmcmahill Exp $
http://bugzilla.gnome.org/show_bug.cgi?id=359190
--- glib/gtimer.c.orig 2006-08-27 23:05:42.000000000 -0400
+++ glib/gtimer.c 2006-10-02 09:34:45.507139000 -0400
@@ -48,4 +48,6 @@
#endif /* G_OS_WIN32 */
+#include <time.h>
+
#include "glib.h"
#include "galias.h"
@@ -92,5 +94,9 @@
{
initialized = TRUE;
-#if !defined(_POSIX_MONOTONIC_CLOCK) || _POSIX_MONOTONIC_CLOCK >= 0
+#if defined(__DragonFly__)
+ /* DragonFly has a monotonic clock, but not the define or sysconf support */
+ posix_clock = CLOCK_MONOTONIC;
+#else
+#if defined(_SC_MONOTONIC_CLOCK) && (!defined(_POSIX_MONOTONIC_CLOCK) || _POSIX_MONOTONIC_CLOCK >= 0)
if (sysconf (_SC_MONOTONIC_CLOCK) >= 0)
posix_clock = CLOCK_MONOTONIC;
@@ -98,4 +104,5 @@
#endif
posix_clock = CLOCK_REALTIME;
+#endif
}
}
|