summaryrefslogtreecommitdiff
path: root/multimedia/vlc/patches/patch-aa
blob: 4aea379ab38fcdf9969aa368ebb565dafdb8c6b6 (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.7.2.3 2009/09/28 09:57:01 tron 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))