Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
cd8f0c4b
Commit
cd8f0c4b
authored
Jun 20, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use fstatvfs where usable (BSD) - fixes #3762
(cherry picked from commit
62a73f7d
) Conflicts: configure.ac
parent
affcbabe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
20 deletions
+21
-20
configure.ac
configure.ac
+2
-2
modules/access/file.c
modules/access/file.c
+19
-18
No files found.
configure.ac
View file @
cd8f0c4b
...
...
@@ -549,14 +549,14 @@ dnl Check for system libs needed
need_libc=false
dnl Check for usual libc functions
AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir fork getenv getpwuid_r gettimeofday isatty lstat memalign openat posix_fadvise posix_madvise posix_memalign setenv setlocale stricmp strnicmp tdestroy uselocale])
AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir f
statvfs f
ork getenv getpwuid_r gettimeofday isatty lstat memalign openat posix_fadvise posix_madvise posix_memalign setenv setlocale stricmp strnicmp tdestroy uselocale])
AC_REPLACE_FUNCS([asprintf atof atoll getcwd getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab vasprintf])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
])
dnl Check for non-standard system calls
AC_CHECK_FUNCS([accept4 dup3 eventfd
fstatfs
vmsplice])
AC_CHECK_FUNCS([accept4 dup3 eventfd vmsplice])
AH_BOTTOM([#include <vlc_fixups.h>])
...
...
modules/access/file.c
View file @
cd8f0c4b
...
...
@@ -39,21 +39,20 @@
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if defined(HAVE_FSTATFS) && defined(__SunOS)
# undef HAVE_FSTATFS
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#if defined (__linux__)
# include <sys/vfs.h>
#ifdef HAVE_FSTATVFS
# include <sys/statvfs.h>
# if defined (HAVE_SYS_MOUNT_H)
# include <sys/param.h>
# include <sys/mount.h>
# endif
#endif
#ifdef HAVE_LINUX_MAGIC_H
# include <sys/vfs.h>
# include <linux/magic.h>
#endif
#elif defined (HAVE_SYS_MOUNT_H)
# include <sys/param.h>
# include <sys/mount.h>
#endif
#if defined( WIN32 )
# include <io.h>
...
...
@@ -91,17 +90,20 @@ struct access_sys_t
#ifndef WIN32
static
bool
IsRemote
(
int
fd
)
{
#ifdef HAVE_FSTATFS
#if defined (HAVE_FSTATVFS) && defined (MNT_LOCAL)
struct
statvfs
stf
;
if
(
fstatvfs
(
fd
,
&
stf
))
return
false
;
/* fstatvfs() is in POSIX, but MNT_LOCAL is not */
return
!
(
s
.
f_flag
&
MNT_LOCAL
);
#elif defined (HAVE_LINUX_MAGIC_H)
struct
statfs
stf
;
if
(
fstatfs
(
fd
,
&
stf
))
return
false
;
#if defined(MNT_LOCAL)
return
!
(
stf
.
f_flags
&
MNT_LOCAL
);
#else
# ifdef HAVE_LINUX_MAGIC_H
switch
(
stf
.
f_type
)
{
case
AFS_SUPER_MAGIC
:
...
...
@@ -113,9 +115,8 @@ static bool IsRemote (int fd)
return
true
;
}
return
false
;
# endif
#endif
#else
/* !HAVE_FSTATFS */
#else
(
void
)
fd
;
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment