summaryrefslogtreecommitdiff
path: root/devel/opencm/patches/patch-ag
blob: b60f801968833cc0f2fe856366206e34ffc105c9 (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
$NetBSD: patch-ag,v 1.1 2004/09/16 13:34:13 agc Exp $

--- src/common/OS/unix-os.c	2004/09/16 13:14:28	1.1
+++ src/common/OS/unix-os.c	2004/09/16 13:23:00
@@ -417,13 +417,22 @@
 }
 
 #ifdef HAVE_SVR4_STATVFS
+
+#  ifdef __NetBSD__
+#  define BASETYPE	f_fstypename
+#  define TYPE_LENGTH	_VFS_NAMELEN
+#  else
+#  define BASETYPE	f_basetype
+#  define TYPE_LENGTH	FSTYPSZ
+#  endif
+
 OC_bool 
 os_is_local_path(const char *path)
 {
   struct statvfs sfs;
   statvfs(path, &sfs);
 
-  if (strncmp(sfs.f_basetype, "nfs", FSTYPSZ) == 0)
+  if (strncmp(sfs.BASETYPE, "nfs", TYPE_LENGTH) == 0)
     return FALSE;
   return TRUE;
 }