summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mtab.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mtab.c b/mtab.c
index fd2d71e..70152cd 100644
--- a/mtab.c
+++ b/mtab.c
@@ -140,14 +140,20 @@ struct bfs_mtab *parse_bfs_mtab() {
#elif BFS_MNTINFO
- struct statfs *mntbuf;
+#if __NetBSD__
+ typedef struct statvfs bfs_statfs;
+#else
+ typedef struct statfs bfs_statfs;
+#endif
+
+ bfs_statfs *mntbuf;
int size = getmntinfo(&mntbuf, MNT_WAIT);
if (size < 0) {
error = errno;
goto fail;
}
- for (struct statfs *mnt = mntbuf; mnt < mntbuf + size; ++mnt) {
+ for (bfs_statfs *mnt = mntbuf; mnt < mntbuf + size; ++mnt) {
if (bfs_mtab_add(mtab, mnt->f_mntonname, mnt->f_fstypename) != 0) {
error = errno;
goto fail;