06369e0eb2
I'll import 1.1.6 in a minute, but it is still a bit rough around the edges so better keep a fallback.
30 lines
833 B
Text
30 lines
833 B
Text
$NetBSD: patch-aa,v 1.1.1.1 2011/01/24 18:45:54 drochner 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))
|