GNOME Bugzilla – Bug 359190
gtimer.c failes to compile on solaris-2.9
Last modified: 2006-10-06 18:52:55 UTC
glib-2.12.3, gcc-3.3.5, solaris-2.9/sparc. glib/gtimer.c fails to compile because _SC_MONOTONIC_CLOCK is not defined yet the #if's reach that point in the code. DragonFly also has some issues around there. The attached patch seems to work for me on solaris and someone else on DragonFly. I did a find+grep over /usr/include and _SC_MONOTONIC_CLOCK isn't in there. -Dan
Created attachment 73917 [details] [review] patch to glib/gtimer.c for solaris and DragonFly seems to work for me on solaris-2.9 and I've heard it works right on DragonFly too.
Please try with 2.12.4. If it still does not work, we need to find another solution, but I don't want #if defined(__Dragonfly__) sprinkled over the code...
I just tried with 2.12.4 on a solaris-2.8 box and it also failed to compile. There seems to be a somewhat obvious typo that fixes compilation. Here is the change. --- glib/gtimer.c.orig 2006-10-01 01:51:15.000000000 -0400 +++ glib/gtimer.c 2006-10-03 14:09:13.177352000 -0400 @@ -258,5 +258,5 @@ if (microseconds) *microseconds = (elapsed / 10) % 1000000; -#elif HAVE_CLOCK_GETTIME +#elif USE_CLOCK_GETTIME if (timer->active) GETTIME (timer->end); As far as DragonFly, I'll contact the person who did the DragonFly part of the original patch to see if he can comment on 2.12.4 and also the patch in this comment. -Dan
I "worked around" this bug by changing HAVE_CLOCK_GETTIME to 0. What ill effects will this have if I keep working with it?
Except for the DragonFly bit (which I'm almost sure isn't needed) this is a duplicate of bug 353694.
2006-10-06 Matthias Clasen <mclasen@redhat.com> * glib/gtimer.c: Fix a typo. (#359190)