pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/glib2 Fixes glib2 on netbsd-5. From OBATA Akio. ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ba79a5cfc9a8
branches: trunk
changeset: 639522:ba79a5cfc9a8
user: jklos <jklos%pkgsrc.org@localhost>
date: Sun Sep 14 21:36:19 2014 +0000
description:
Fixes glib2 on netbsd-5. From OBATA Akio. Tested on macppc and amd64.
diffstat:
devel/glib2/distinfo | 3 +-
devel/glib2/patches/patch-glib_gthread-posix.c | 34 ++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletions(-)
diffs (53 lines):
diff -r 7d461052efff -r ba79a5cfc9a8 devel/glib2/distinfo
--- a/devel/glib2/distinfo Sun Sep 14 20:44:28 2014 +0000
+++ b/devel/glib2/distinfo Sun Sep 14 21:36:19 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.200 2014/09/05 20:49:55 prlw1 Exp $
+$NetBSD: distinfo,v 1.201 2014/09/14 21:36:19 jklos Exp $
SHA1 (glib-2.40.0.tar.xz) = 44e1442ed4d1bf3fa89138965deb35afc1335a65
RMD160 (glib-2.40.0.tar.xz) = c50eed34bf8df127b959af27b02d6036934f758e
@@ -31,4 +31,5 @@
SHA1 (patch-gio_gunixcredentialsmessage.c) = ad4d56ac750e1822324c58c5e34e8f46ea1b58ac
SHA1 (patch-gio_tests_credentials.c) = b26089f372d4fe3903e536867caacf52b1aa45d5
SHA1 (patch-glib_gmessages.c) = 623ee56d9a11e4d97981ee3011f8717c5a2a9403
+SHA1 (patch-glib_gthread-posix.c) = 58e80ea627b39d672d31b81bee552701eff5a552
SHA1 (patch-glib_gtimezone.c) = d9686da52f171a073d80cfd9f80aa490088a00a3
diff -r 7d461052efff -r ba79a5cfc9a8 devel/glib2/patches/patch-glib_gthread-posix.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-glib_gthread-posix.c Sun Sep 14 21:36:19 2014 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-glib_gthread-posix.c,v 1.1 2014/09/14 21:36:19 jklos Exp $
+
+--- glib/gthread-posix.c.orig 2014-02-22 15:29:07.000000000 +0000
++++ glib/gthread-posix.c
+@@ -644,6 +644,7 @@ g_cond_impl_new (void)
+ #elif defined (HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined (CLOCK_MONOTONIC)
+ if G_UNLIKELY ((status = pthread_condattr_setclock (&attr, CLOCK_MONOTONIC)) != 0)
+ g_thread_abort (status, "pthread_condattr_setclock");
++#elif defined (CLOCK_MONOTONIC)
+ #else
+ #error Cannot support GCond on your platform.
+ #endif
+@@ -892,6 +893,21 @@ g_cond_wait_until (GCond *cond,
+ if ((status = pthread_cond_timedwait (g_cond_get_impl (cond), g_mutex_get_impl (mutex), &ts)) == 0)
+ return TRUE;
+ }
++#elif defined (CLOCK_MONOTONIC)
++ {
++ gint64 monotonic_now = g_get_monotonic_time ();
++ gint64 real_end_time;
++
++ if (end_time <= monotonic_now)
++ return FALSE;
++
++ real_end_time = g_get_real_time () + (end_time - monotonic_now);
++
++ ts.tv_sec = real_end_time / 1000000;
++ ts.tv_nsec = (real_end_time % 1000000) * 1000;
++ if ((status = pthread_cond_timedwait (g_cond_get_impl (cond), g_mutex_get_impl (mutex), &ts)) == 0)
++ return TRUE;
++ }
+ #else
+ #error Cannot support GCond on your platform.
+ #endif
Home |
Main Index |
Thread Index |
Old Index