From 5fb80928bb367d7410d510d0d889909652553003 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 11 Apr 2013 13:13:14 +0300 Subject: [PATCH] Fixed getmntinfo() usage with NetBSD. Patch by Emmanuel Dreyfus --- src/lib/mountpoint.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 4aa8f2d1af..e1aa44d9d8 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -137,7 +137,11 @@ struct mountpoint_iter { #elif defined(MOUNTPOINT_SOLARIS) || defined(MOUNTPOINT_LINUX) FILE *f; #elif defined(HAVE_GETMNTINFO) /* BSDs */ +#ifndef __NetBSD__ struct statfs *fs; +#else + struct statvfs *fs; +#endif int count; #endif struct mountpoint mnt; @@ -287,7 +291,11 @@ const struct mountpoint *mountpoint_iter_next(struct mountpoint_iter *iter) return NULL; #elif defined(HAVE_GETMNTINFO) /* BSDs */ while (iter->count > 0) { +#ifndef __NetBSD__ struct statfs *fs = iter->fs; +#else + struct statvfs *fs = iter->fs; +#endif iter->fs++; iter->count--; -- 2.47.3