After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 359190 - gtimer.c failes to compile on solaris-2.9
gtimer.c failes to compile on solaris-2.9
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.12.x
Other Solaris
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2006-10-03 02:28 UTC by Dan McMahill
Modified: 2006-10-06 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to glib/gtimer.c for solaris and DragonFly (816 bytes, patch)
2006-10-03 02:29 UTC, Dan McMahill
none Details | Review

Description Dan McMahill 2006-10-03 02:28:32 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
Comment 1 Dan McMahill 2006-10-03 02:29:41 UTC
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.
Comment 2 Matthias Clasen 2006-10-03 14:32:28 UTC
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...
Comment 3 Dan McMahill 2006-10-03 20:19:56 UTC
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
Comment 4 Rado S 2006-10-06 11:52:02 UTC
I "worked around" this bug by changing HAVE_CLOCK_GETTIME to 0.
What ill effects will this have if I keep working with it?
Comment 5 Jens Granseuer 2006-10-06 12:33:03 UTC
Except for the DragonFly bit (which I'm almost sure isn't needed) this is a duplicate of bug 353694.
Comment 6 Matthias Clasen 2006-10-06 18:52:55 UTC
2006-10-06  Matthias Clasen  <mclasen@redhat.com> 

        * glib/gtimer.c: Fix a typo.  (#359190)