[glib] Build with old libmount too
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Build with old libmount too
- Date: Wed, 1 Nov 2017 18:22:29 +0000 (UTC)
commit 96ebcee8c4d555805e6aa6cf5ea6fcb16299dc81
Author: Colin Walters <walters verbum org>
Date: Wed Nov 1 10:21:34 2017 -0400
Build with old libmount too
Downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1508056
This is an easy change, and lets us build with RHEL7's libmount.
See also https://github.com/ostreedev/ostree/commit/cee57a0268334d51cd312c6cdcf367bedfd3e30d
configure.ac | 6 ++++--
gio/gunixmounts.c | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b34ec4d..e2eee28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1760,8 +1760,10 @@ AS_IF([ test $have_libmount = maybe ], [
glib_save_LIBS=$LIBS
AC_CHECK_HEADER([libmount/libmount.h], [:], [have_libmount=no])
- # Check for a recent enough libmount
- AC_CHECK_LIB([mount], [mnt_unref_table], [:], [have_libmount=no])
+ # We used to check for mnt_unref_table(), but now for compat with
+ # e.g. RHEL7 just use mnt_free_table(). Let's keep this check
+ # anyways.
+ AC_CHECK_LIB([mount], [mnt_free_table], [:], [have_libmount=no])
LIBS=$glib_save_LIBS
if test $have_libmount != no; then
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index ef7899d..a3c40f5 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -505,7 +505,7 @@ _g_get_unix_mounts (void)
mnt_free_iter (iter);
out:
- mnt_unref_table (table);
+ mnt_free_table (table);
return g_list_reverse (return_list);
}
@@ -1029,7 +1029,7 @@ _g_get_unix_mount_points (void)
mnt_free_iter (iter);
out:
- mnt_unref_table (table);
+ mnt_free_table (table);
return g_list_reverse (return_list);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]