summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2024-01-31 13:35:39 +0100
committerOndrej Holy <oholy@redhat.com>2024-01-31 14:53:42 +0100
commitc7254fb3ad1e2ff3bfc6437fc5a836487398195f (patch)
tree33f9797886e6b5a947fa3feec7ccc63d90f8a098 /meson.build
parent1abbbd761e87c2192a3881a82652f1cd9a2cc447 (diff)
gunixmounts: Use mnt_monitor_veil_kernel option
The previous commit enabled the `/run/mount/utab` monitoring. The problem is that the `mount-changed` signal can be emitted twice for one mount. One for the `/proc/mounts` file change and another one for the `/run/media/utab` file change. This is still not ideal because e.g. the `GMount` objects for mounts with the `x-gvfs-hide` option are added and immediately removed. Let's enable the `mnt_monitor_veil_kernel` option to avoid this. Related: https://github.com/util-linux/util-linux/pull/2725
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 909ddd26c..28616aa86 100644
--- a/meson.build
+++ b/meson.build
@@ -2245,6 +2245,10 @@ libmount_dep = []
if host_system == 'linux'
libmount_dep = dependency('mount', version : '>=2.23', required : get_option('libmount'))
glib_conf.set('HAVE_LIBMOUNT', libmount_dep.found())
+
+ if libmount_dep.found() and cc.has_function('mnt_monitor_veil_kernel', dependencies: libmount_dep)
+ glib_conf.set('HAVE_MNT_MONITOR_VEIL_KERNEL', 1)
+ endif
endif
if host_system == 'windows'