diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 7ab0daf4d..c0247227c 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -189,11 +189,13 @@ static GSource *proc_mounts_watch_source = NULL; #include #endif -#if (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) +#if (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT) || defined(HAVE_GETFSENT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) #include -#include #include #include +#ifdef HAVE_SYS_UCRED_H +#include +#endif #ifdef HAVE_SYS_SYSCTL_H #include #endif @@ -1653,7 +1655,7 @@ _g_get_unix_mount_points (void) return unix_mount_point_array_free_to_list (g_steal_pointer (&points), n_points); } -#elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) +#elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT) || defined(HAVE_GETFSENT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) static GList * _g_get_unix_mount_points (void) diff --git a/meson.build b/meson.build index bfacf7eeb..f453d748c 100644 --- a/meson.build +++ b/meson.build @@ -435,6 +435,7 @@ headers = [ 'sys/time.h', # MSC does not come with this by default 'sys/times.h', 'sys/types.h', + 'sys/ucred.h', 'sys/uio.h', 'sys/vfs.h', 'sys/vfstab.h', @@ -698,6 +699,7 @@ functions = [ 'ftruncate64', 'getauxval', 'getc_unlocked', + 'getfsent', 'getfsstat', 'getgrgid_r', 'getmntent_r',