]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed getmntinfo() usage with NetBSD.
authorTimo Sirainen <tss@iki.fi>
Thu, 11 Apr 2013 10:13:14 +0000 (13:13 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 11 Apr 2013 10:13:14 +0000 (13:13 +0300)
Patch by Emmanuel Dreyfus

src/lib/mountpoint.c

index 4aa8f2d1afee1005a5ea41655ea890b60f5a4fa4..e1aa44d9d866d20a9154a5a27067baee57e628b6 100644 (file)
@@ -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--;