diff --git a/configure.ac b/configure.ac index a519e63d7..caabef6ed 100644 --- a/configure.ac +++ b/configure.ac @@ -894,7 +894,7 @@ AC_ARG_ENABLE([glib2], AS_HELP_STRING([--disable-glib2],[Disable optional GLib 2 support])) AS_IF([test "x$enable_glib2" != "xno"], - [PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ], HAVE_GLIB20=1, HAVE_GLIB20=0)], + [PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.28.0 ], HAVE_GLIB20=1, HAVE_GLIB20=0)], HAVE_GLIB20=0) AS_IF([test "x$enable_glib2" = "xyes" && test "x$HAVE_GLIB20" = "x0"], diff --git a/meson.build b/meson.build index 658eeee57..1c671d32c 100644 --- a/meson.build +++ b/meson.build @@ -556,7 +556,7 @@ if gio_dep.found() cdata.set('HAVE_GSETTINGS', 1) endif -glib_dep = dependency('glib-2.0', version : '>= 2.4.0', required: get_option('glib')) +glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib')) if glib_dep.found() cdata.set('HAVE_GLIB', 1) endif diff --git a/src/pulse/glib-mainloop.c b/src/pulse/glib-mainloop.c index 1ce3cd39e..77295def8 100644 --- a/src/pulse/glib-mainloop.c +++ b/src/pulse/glib-mainloop.c @@ -482,16 +482,15 @@ static gboolean prepare_func(GSource *source, gint *timeout) { return TRUE; } else if (g->n_enabled_time_events) { pa_time_event *t; - GTimeVal now; + gint64 now; struct timeval tvnow; pa_usec_t usec; t = find_next_time_event(g); g_assert(t); - g_get_current_time(&now); - tvnow.tv_sec = now.tv_sec; - tvnow.tv_usec = now.tv_usec; + now = g_get_real_time(); + pa_timeval_store(&tvnow, now); if (pa_timeval_cmp(&t->timeval, &tvnow) <= 0) { *timeout = 0; @@ -514,15 +513,14 @@ static gboolean check_func(GSource *source) { return TRUE; else if (g->n_enabled_time_events) { pa_time_event *t; - GTimeVal now; + gint64 now; struct timeval tvnow; t = find_next_time_event(g); g_assert(t); - g_get_current_time(&now); - tvnow.tv_sec = now.tv_sec; - tvnow.tv_usec = now.tv_usec; + now = g_get_real_time(); + pa_timeval_store(&tvnow, now); if (pa_timeval_cmp(&t->timeval, &tvnow) <= 0) return TRUE; @@ -558,16 +556,15 @@ static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer us } if (g->n_enabled_time_events) { - GTimeVal now; + gint64 now; struct timeval tvnow; pa_time_event *t; t = find_next_time_event(g); g_assert(t); - g_get_current_time(&now); - tvnow.tv_sec = now.tv_sec; - tvnow.tv_usec = now.tv_usec; + now = g_get_real_time(); + pa_timeval_store(&tvnow, now); if (pa_timeval_cmp(&t->timeval, &tvnow) <= 0) {