void-packages/templates/glib-2.18.1-fix-statfs-netb...

36 lines
1.0 KiB
Diff

$NetBSD: patch-ba,v 1.3 2008/09/06 11:07:20 obache Exp $
--- gio/gunixmounts.c.orig 2008-09-02 15:09:19.000000000 +0000
+++ gio/gunixmounts.c
@@ -563,7 +563,11 @@ get_mtab_monitor_file (void)
static GList *
_g_get_unix_mounts (void)
{
+#ifdef __NetBSD__
+ struct statvfs *mntent = NULL;
+#else
struct statfs *mntent = NULL;
+#endif
int num_mounts, i;
GUnixMountEntry *mount_entry;
GList *return_list;
@@ -580,8 +584,18 @@ _g_get_unix_mounts (void)
mount_entry->mount_path = g_strdup (mntent[i].f_mntonname);
mount_entry->device_path = g_strdup (mntent[i].f_mntfromname);
+#if defined(__digital__)
+ mount_entry->filesystem_type = g_strdup ("unknown");
+#else
mount_entry->filesystem_type = g_strdup (mntent[i].f_fstypename);
+#endif
+#if defined(__NetBSD__)
+ if (mntent[i].f_flag & MNT_RDONLY)
+#elif defined(__digital__)
+ if (mntent[i].f_flags & M_RDONLY)
+#else
if (mntent[i].f_flags & MNT_RDONLY)
+#endif
mount_entry->is_read_only = TRUE;
mount_entry->is_system_internal =