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

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