Blame SOURCES/0001-Build-with-old-libmount-too.patch

fd368b
From a78c36d7f4e0e3038005305efd84f66a7d157f20 Mon Sep 17 00:00:00 2001
fd368b
From: Colin Walters <walters@verbum.org>
fd368b
Date: Wed, 1 Nov 2017 10:21:34 -0400
fd368b
Subject: [PATCH] Build with old libmount too
fd368b
fd368b
Downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1508056
fd368b
fd368b
This is an easy change, and lets us build with RHEL7's libmount.
fd368b
fd368b
See also https://github.com/ostreedev/ostree/commit/cee57a0268334d51cd312c6cdcf367bedfd3e30d
fd368b
---
fd368b
 configure.ac      | 6 ++++--
fd368b
 gio/gunixmounts.c | 4 ++--
fd368b
 2 files changed, 6 insertions(+), 4 deletions(-)
fd368b
fd368b
diff --git a/configure.ac b/configure.ac
fd368b
index fcbb62e7d..0beb3898c 100644
fd368b
--- a/configure.ac
fd368b
+++ b/configure.ac
fd368b
@@ -1760,8 +1760,10 @@ AS_IF([ test $have_libmount = maybe ], [
fd368b
   glib_save_LIBS=$LIBS
fd368b
   AC_CHECK_HEADER([libmount/libmount.h], [:], [have_libmount=no])
fd368b
 
fd368b
-  # Check for a recent enough libmount
fd368b
-  AC_CHECK_LIB([mount], [mnt_unref_table], [:], [have_libmount=no])
fd368b
+  # We used to check for mnt_unref_table(), but now for compat with
fd368b
+  # e.g. RHEL7 just use mnt_free_table().  Let's keep this check
fd368b
+  # anyways.
fd368b
+  AC_CHECK_LIB([mount], [mnt_free_table], [:], [have_libmount=no])
fd368b
   LIBS=$glib_save_LIBS
fd368b
 
fd368b
   if test $have_libmount != no; then
fd368b
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
fd368b
index ef7899dff..a3c40f5c1 100644
fd368b
--- a/gio/gunixmounts.c
fd368b
+++ b/gio/gunixmounts.c
fd368b
@@ -505,7 +505,7 @@ _g_get_unix_mounts (void)
fd368b
   mnt_free_iter (iter);
fd368b
 
fd368b
  out:
fd368b
-  mnt_unref_table (table);
fd368b
+  mnt_free_table (table);
fd368b
 
fd368b
   return g_list_reverse (return_list);
fd368b
 }
fd368b
@@ -1029,7 +1029,7 @@ _g_get_unix_mount_points (void)
fd368b
   mnt_free_iter (iter);
fd368b
 
fd368b
  out:
fd368b
-  mnt_unref_table (table);
fd368b
+  mnt_free_table (table);
fd368b
 
fd368b
   return g_list_reverse (return_list);
fd368b
 }
fd368b
-- 
fd368b
2.13.6
fd368b