blob: c4d299b6d5dc8bde234a1318ffcbf70eab4e3edd (
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
|
$NetBSD: patch-aa,v 1.10 2009/09/24 22:14:57 ahoka Exp $
--- modules/access/file.c.orig 2009-09-18 18:37:45.000000000 +0200
+++ modules/access/file.c
@@ -50,6 +50,8 @@
#if defined (__linux__)
# include <sys/vfs.h>
# include <linux/magic.h>
+#elif defined (HAVE_FSTATVFS)
+# include <sys/statvfs.h>
#elif defined (HAVE_SYS_MOUNT_H)
# include <sys/param.h>
# include <sys/mount.h>
@@ -126,7 +128,12 @@ struct access_sys_t
static bool IsRemote (int fd)
{
-#ifdef HAVE_FSTATFS
+#ifdef HAVE_FSTATVFS
+ struct statvfs s;
+ if (fstatvfs(fd, &s))
+ return false;
+ return !(s.f_flag & MNT_LOCAL);
+#elif defined (HAVE_FSTATFS)
struct statfs stf;
if (fstatfs (fd, &stf))
|