From: Timo Sirainen Date: Thu, 11 Apr 2013 10:13:14 +0000 (+0300) Subject: Fixed getmntinfo() usage with NetBSD. X-Git-Tag: 2.2.0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fb80928bb367d7410d510d0d889909652553003;p=thirdparty%2Fdovecot%2Fcore.git Fixed getmntinfo() usage with NetBSD. Patch by Emmanuel Dreyfus --- 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--;