blob: ebcd89edbabaa3eb4208a325d2e07e1584a74da6 (
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
|
$NetBSD: patch-aa,v 1.13 2010/07/03 14:24:26 wiz Exp $
http://trac.videolan.org/vlc/ticket/3762
--- modules/access/file.c.orig 2009-09-18 19:37:45 +0300
+++ modules/access/file.c 2009-09-26 07:18:35 +0300
@@ -50,6 +50,9 @@
#if defined (__linux__)
# include <sys/vfs.h>
# include <linux/magic.h>
+#elif defined (HAVE_FSTATVFS)
+# include <sys/statvfs.h>
+# include <sys/mount.h>
#elif defined (HAVE_SYS_MOUNT_H)
# include <sys/param.h>
# include <sys/mount.h>
@@ -126,7 +129,12 @@ struct access_sys_t
static bool IsRemote (int fd)
{
-#ifdef HAVE_FSTATFS
+#if !defined(__linux__) && defined(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))
|