summaryrefslogtreecommitdiff
path: root/sysutils/e2fsprogs/patches/patch-af
blob: 1a134399073baaa1b371062e0052a32da5714f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$NetBSD: patch-af,v 1.5 2007/06/20 19:51:09 jlam Exp $

--- lib/ext2fs/ismounted.c.orig	2005-09-06 05:40:14.000000000 -0400
+++ lib/ext2fs/ismounted.c
@@ -29,7 +29,11 @@
 #include <sys/mount.h>
 #endif /* HAVE_GETMNTINFO */
 #include <string.h>
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 299000900
+#include <sys/statvfs.h>
+#else
 #include <sys/stat.h>
+#endif
 
 #include "ext2_fs.h"
 #include "ext2fs.h"
@@ -196,7 +200,11 @@ static errcode_t check_mntent(const char
 static errcode_t check_getmntinfo(const char *file, int *mount_flags,
 				  char *mtpt, int mtlen)
 {
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 299000900
+	struct statvfs *mp;
+#else
 	struct statfs *mp;
+#endif
         int    len, n;
         const  char   *s1;
 	char	*s2;
@@ -325,9 +333,9 @@ errcode_t ext2fs_check_mount_point(const
 			*mount_flags |= EXT2_MF_BUSY;
 	} else
 		close(fd);
+#endif
 
 	return 0;
-#endif
 }
 
 /*