summaryrefslogtreecommitdiff
path: root/net/rdist6/patches/patch-ad
blob: 0ffe85b4b2071b17b909dadb9b6731bccf3267ab (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-ad,v 1.1 1999/08/29 12:26:22 kim Exp $

--- src/filesys-os.c.orig	Thu Feb 15 14:01:04 1996
+++ src/filesys-os.c	Sun Aug 29 07:50:07 1999
@@ -51,7 +51,9 @@
 
 #if 	FSI_TYPE == FSI_GETFSSTAT
 static struct statfs   *mnt = NULL;
+#if	!defined(NETBSD)
 typedef u_long 		ulong;
+#endif	/* !NetBSD */
 #endif	/* FSI_GETFSSTAT */
 
 #if	FSI_TYPE == FSI_MNTCTL
@@ -179,6 +181,16 @@
 	if (mnt->f_flags & M_RDONLY)
 		mntstruct.me_flags |= MEFLAG_READONLY;
 #endif
+#if	defined(NETBSD)
+	if (strcmp(mnt->f_fstypename, MOUNT_NFS)) {
+		(void) sprintf(remote_dev, "%s", mnt->f_mntfromname);
+		mntstruct.me_path = remote_dev;
+		mntstruct.me_type = METYPE_NFS;
+	} else {
+		mntstruct.me_path = mnt->f_mntonname;
+		mntstruct.me_type = METYPE_OTHER;
+	}
+#else
 	switch ((ulong)((struct statfs*)mnt)->f_type) {
 	      case MOUNT_NFS:
 		(void) sprintf(remote_dev, "%s", mnt->f_mntfromname);
@@ -190,6 +202,7 @@
 		mntstruct.me_type = METYPE_OTHER;
 		break;
 	}
+#endif	/* !NetBSD */
 
 	mnt++;
 	entries_left--;