GNOME Bugzilla – Bug 782628
libmount build dependency check not requiring the right version?
Last modified: 2017-05-16 10:25:44 UTC
This is un ubuntu trusty (sigh): gunixmounts.c: In function '_g_get_unix_mounts': gunixmounts.c:433:3: error: implicit declaration of function 'mnt_unref_table' [-Werror=implicit-function-declaration] mnt_unref_table (table); ^ I guess this is related to libmount, where trusty has 2.20.1-5.1ubuntu20.9 mnt_unref_table has been added in 2.24: https://www.kernel.org/pub/linux/utils/util-linux/v2.24/libmount-docs/libmount-Table-of-filesystems.html#mnt-unref-table
GLib checks using pkg-config for libmount ≥ 2.28: PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.28], [have_libmount=yes], [have_libmount=maybe]) But it will fall back to checking just for the header. We should add a check for mnt_unref_table() as well.
Created attachment 351840 [details] [review] Check for a recent enough libmount We need mnt_unref_table() in order to use libmount, but we also need to keep the fallback code for installations of libmount without a pkg-config file.
Review of attachment 351840 [details] [review]: Yes.
Attachment 351840 [details] pushed as 5faaaac - Check for a recent enough libmount