summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2018-05-29 09:26:18 +0200
committerOndrej Holy <oholy@redhat.com>2018-05-30 10:47:40 +0200
commit550aaf87c222a1626273e579e566f889b43006cf (patch)
tree9eca1e8feb382fee6e8cb16a0c4eada77b9047f3
parente0afabc3ab3377b31bfb54ed90dd6936025aa83f (diff)
downloadgvfs-550aaf87c222a1626273e579e566f889b43006cf.tar.gz
Do not require the latest glib version
The proposed GitLab CI uses Fedora Rawhide which doesn't include the latest GLib yet. Let's use g_unix_mount_get_options conditionaly.
-rw-r--r--meson.build4
-rw-r--r--monitor/udisks2/gvfsudisks2volumemonitor.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index f171ea56..f3284432 100644
--- a/meson.build
+++ b/meson.build
@@ -224,9 +224,11 @@ have_version_script = host_machine.system().contains('linux') and cc.has_argumen
gio_dep = dependency('gio-2.0')
gio_unix_dep = dependency('gio-unix-2.0')
-glib_dep = dependency('glib-2.0', version: '>= 2.57.1')
+glib_dep = dependency('glib-2.0', version: '>= 2.51.0')
gobject_dep = dependency('gobject-2.0')
+config_h.set('HAVE_GLIB_2_57_1', glib_dep.version().version_compare('>= 2.57.1'))
+
# *** Check for libXML ***
libxml_dep = dependency('libxml-2.0', required: false)
have_libxml = libxml_dep.found()
diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c
index e1d67fb8..e6d42ead 100644
--- a/monitor/udisks2/gvfsudisks2volumemonitor.c
+++ b/monitor/udisks2/gvfsudisks2volumemonitor.c
@@ -698,9 +698,11 @@ should_include_mount (GVfsUDisks2VolumeMonitor *monitor,
GUnixMountEntry *mount_entry)
{
GUnixMountPoint *mount_point;
- const gchar *options;
gboolean ret;
+#ifdef HAVE_GLIB_2_57_1
+ const gchar *options;
+
/* g_unix_mount_get_options works only with libmount,
* see https://bugzilla.gnome.org/show_bug.cgi?id=668132
*/
@@ -711,6 +713,7 @@ should_include_mount (GVfsUDisks2VolumeMonitor *monitor,
options);
goto out;
}
+#endif
/* if mounted at the designated mount point, use that info to decide */
mount_point = get_mount_point_for_mount (mount_entry);