aboutsummaryrefslogtreecommitdiff
path: root/games/wargus/files/patch-rip__music_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'games/wargus/files/patch-rip__music_unix.cpp')
-rw-r--r--games/wargus/files/patch-rip__music_unix.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/games/wargus/files/patch-rip__music_unix.cpp b/games/wargus/files/patch-rip__music_unix.cpp
deleted file mode 100644
index 3348b7702c6a..000000000000
--- a/games/wargus/files/patch-rip__music_unix.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
---- rip_music_unix.cpp.orig 2015-03-19 18:36:34 UTC
-+++ rip_music_unix.cpp
-@@ -39,7 +39,12 @@
- #include <unistd.h>
- #include <libgen.h>
-
--#include <mntent.h>
-+#if defined(__linux__)
-+# include <mntent.h>
-+#elif defined(__FreeBSD__)
-+# include <sys/param.h>
-+# include <sys/mount.h>
-+#endif
-
- #include "rip_music.h"
-
-@@ -140,6 +145,7 @@ static char * find_mnt_dir(const char *
-
- static char * find_dev(const char * mnt_dir) {
-
-+#if defined(__linux__)
- struct mntent * mnt;
- char * dev = NULL;
- FILE * file;
-@@ -167,6 +173,20 @@ static char * find_dev(const char * mnt_
- endmntent(file);
-
- return dev;
-+#elif defined(__FreeBSD__)
-+ struct statfs sfs;
-+
-+ if ( statfs(mnt_dir, &sfs) != 0 ) {
-+
-+ fprintf(stderr, "Error: Cannot get mounted device: %s\n", strerror(errno));
-+ return NULL;
-+
-+ }
-+
-+ return strdup(sfs.f_mntfromname);
-+#else
-+ return NULL;
-+#endif
-
- }
-