From 14e3b128237279d895128e4d611cd12c604a67d4 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 14 Oct 2011 00:00:14 -0400 Subject: [PATCH] g_cond_timed_wait: support NULL time parameter It was undocumented, but this used to mean "wait forever". Looks like we have some uses of this internally and there may be others in the wild... --- glib/deprecated/gthread-deprecated.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glib/deprecated/gthread-deprecated.c b/glib/deprecated/gthread-deprecated.c index 8e3ec1539..f7d0cb5cf 100644 --- a/glib/deprecated/gthread-deprecated.c +++ b/glib/deprecated/gthread-deprecated.c @@ -1551,6 +1551,12 @@ g_cond_timed_wait (GCond *cond, { gint64 end_time; + if (abs_time == NULL) + { + g_cond_wait (cond, mutex); + return TRUE; + } + end_time = abs_time->tv_sec; end_time *= 1000000; end_time += abs_time->tv_usec;