diff options
author | marcus <marcus@FreeBSD.org> | 2004-09-15 10:52:17 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-09-15 10:52:17 +0800 |
commit | 48f50691deb9e9eeceb414645b22bfebf855c918 (patch) | |
tree | 82f45922df96c3952c4f7370a48b4f5b5be1fbab /devel | |
parent | c49b1c99249c2b51d852a851336752426c8ebd07 (diff) | |
download | freebsd-ports-gnome-48f50691deb9e9eeceb414645b22bfebf855c918.tar.gz freebsd-ports-gnome-48f50691deb9e9eeceb414645b22bfebf855c918.tar.zst freebsd-ports-gnome-48f50691deb9e9eeceb414645b22bfebf855c918.zip |
Fix a threading portability problem in which g_mutex_trylock_posix_impl() did
not check for a return of EDEADLK, thus causing certain threaded applications
to break (e.g. bmp) with libpthread.
This is slated to be committed in the next release of glib. See
http://bugzilla.gnome.org/show_bug.cgi?id=152009 for more details.
Submitted by: Pascal Hofstee <caelian@gmail.com>
Reviewed by: portmgr
Approved by: portmgr (implicit and no objections from linimon)
Diffstat (limited to 'devel')
-rw-r--r-- | devel/glib20/Makefile | 1 | ||||
-rw-r--r-- | devel/glib20/files/patch-gthread_gthread-posix.c | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile index e855d0f76570..0e14a449f807 100644 --- a/devel/glib20/Makefile +++ b/devel/glib20/Makefile @@ -7,6 +7,7 @@ PORTNAME= glib PORTVERSION= 2.4.6 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME:S,%SUBDIR%,sources/${PORTNAME}/2.4,} \ ftp://ftp.gtk.org/pub/gtk/v2.3/ \ diff --git a/devel/glib20/files/patch-gthread_gthread-posix.c b/devel/glib20/files/patch-gthread_gthread-posix.c index e240b97729c3..bdf24590d4cc 100644 --- a/devel/glib20/files/patch-gthread_gthread-posix.c +++ b/devel/glib20/files/patch-gthread_gthread-posix.c @@ -1,5 +1,5 @@ ---- gthread/gthread-posix.c.orig Mon Nov 4 15:09:47 2002 -+++ gthread/gthread-posix.c Tue Jul 27 09:44:54 2004 +--- gthread/gthread-posix.c.orig Tue Sep 7 17:57:53 2004 ++++ gthread/gthread-posix.c Tue Sep 7 17:58:30 2004 @@ -116,6 +116,7 @@ #endif /* POSIX_MIN_PRIORITY && POSIX_MAX_PRIORITY */ @@ -18,6 +18,15 @@ #endif /* _SC_THREAD_STACK_MIN */ #ifdef HAVE_PRIORITIES # ifdef G_THREADS_IMPL_POSIX +@@ -176,7 +178,7 @@ + result = pthread_mutex_trylock ((pthread_mutex_t *) mutex); + + #ifdef G_THREADS_IMPL_POSIX +- if (result == EBUSY) ++ if ((result == EBUSY) || (result == EDEADLK)) + return FALSE; + #else /* G_THREADS_IMPL_DCE */ + if (result == 0) @@ -307,8 +309,12 @@ if (stack_size) { |