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 736651 - glib doesn't build on NetBSD 5
glib doesn't build on NetBSD 5
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: gthread
2.40.x
Other NetBSD
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-09-14 20:19 UTC by Patrick Welche
Modified: 2014-09-15 01:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pthread_cond_timedwait() implementation of g_cond_wait_until() (1.84 KB, patch)
2014-09-14 23:31 UTC, Patrick Welche
none Details | Review

Description Patrick Welche 2014-09-14 20:19:59 UTC
CC       libglib_2_0_la-gthread-posix.lo
gthread-posix.c:648:2: error: #error Cannot support GCond on your platform.


Essentially, this is because of Bug 673607, which to quote Comment 8 says:

  With this patch, we now require that one of pthread_condattr_setclock() or pthread_cond_timedwait_relative_np() exists.

which isn't implemented on NetBSD 5. (It is in NetBSD 6 and 7)
Comment 1 Patrick Welche 2014-09-14 20:39:34 UTC
NetBSD 5 does have pthread_cond_timedwait and CLOCK_MONOTONIC.
Comment 2 Patrick Welche 2014-09-14 23:31:42 UTC
Created attachment 286180 [details] [review]
pthread_cond_timedwait() implementation of g_cond_wait_until()

Since Bug 673607, g_cond_wait_until requires either pthread_condattr_setclock
or pthread_cond_timedwait_relative_np. This implementation drops the
requirement to pthread_cond_timedwait and CLOCK_MONOTONIC.

Patch from OBATA Akio. Build failure reported and fix tested by John Klos.
Comment 3 Allison Karlitskaya (desrt) 2014-09-15 01:33:20 UTC
Hi Patrick.

Thanks for the patch.

You may have noticed that this is the way that we handled this before, but we dropped it because ultimately it is an unpredictable hack.  If the system clock changes while the sleep is in progress, you may end up timing out immediately or the program may stall for (seemingly) forever.

Long story short is that we're not really interested in having this code back in GLib.  I have no problem if you want to apply this as a patch in your own ports tree, however.

Sorry :(