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
701763cd
Commit
701763cd
authored
Mar 15, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contrib: dvdread: resolve OSX mount points properly
getstatfs seems to work better than getfsent
parent
19bd7f7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
contrib/src/dvdread/osx.patch
contrib/src/dvdread/osx.patch
+43
-0
contrib/src/dvdread/rules.mak
contrib/src/dvdread/rules.mak
+1
-0
No files found.
contrib/src/dvdread/osx.patch
0 → 100644
View file @
701763cd
--- dvdread.orig/src/dvd_reader.c 2012-03-15 09:29:40.000000000 -0400
+++ dvdread/src/dvd_reader.c 2012-03-15 09:32:29.000000000 -0400
@@ -58,6 +58,10 @@
#if defined(__sun)
#include <sys/mnttab.h>
+#elif defined(__APPLE__)
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
#elif defined(SYS_BSD)
#include <fstab.h>
#elif defined(__linux__)
@@ -474,7 +478,28 @@
path_copy[1] = '\0';
}
-#if defined(SYS_BSD)
+#if defined(__APPLE__)
+ struct statfs s[128];
+ int r = getfsstat(NULL, 0, MNT_NOWAIT);
+ if (r > 0) {
+ if (r > 128)
+ r = 128;
+ r = getfsstat(s, r * sizeof(s[0]), MNT_NOWAIT);
+ int i;
+ for (i=0; i<r; i++) {
+ if (!strcmp(path_copy, s[i].f_mntonname)) {
+ dev_name = bsd_block2char(s[i].f_mntfromname);
+ fprintf( stderr,
+ "libdvdread: Attempting to use device %s"
+ " mounted on %s for CSS authentication\n",
+ dev_name,
+ s[i].f_mntonname);
+ auth_drive = DVDOpenImageFile( dev_name, have_css );
+ break;
+ }
+ }
+ }
+#elif defined(SYS_BSD)
if( ( fe = getfsfile( path_copy ) ) ) {
dev_name = bsd_block2char( fe->fs_spec );
fprintf( stderr,
contrib/src/dvdread/rules.mak
View file @
701763cd
...
@@ -18,6 +18,7 @@ $(TARBALLS)/libdvdread-$(LIBDVDREAD_VERSION).tar.bz2:
...
@@ -18,6 +18,7 @@ $(TARBALLS)/libdvdread-$(LIBDVDREAD_VERSION).tar.bz2:
dvdread
:
libdvdread-$(LIBDVDREAD_VERSION).tar.bz2 .sum-dvdread
dvdread
:
libdvdread-$(LIBDVDREAD_VERSION).tar.bz2 .sum-dvdread
$(UNPACK)
$(UNPACK)
$(APPLY)
$(SRC)
/dvdread/dvdread-css-static.patch
$(APPLY)
$(SRC)
/dvdread/dvdread-css-static.patch
$(APPLY)
$(SRC)
/dvdread/osx.patch
ifdef
HAVE_WIN32
ifdef
HAVE_WIN32
$(APPLY)
$(SRC)
/dvdread/dvdread-win32.patch
$(APPLY)
$(SRC)
/dvdread/dvdread-win32.patch
endif
endif
...
...
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