summaryrefslogtreecommitdiff
path: root/filesystems/fuse-mp3fs/patches/patch-aa
diff options
context:
space:
mode:
authorwiz <wiz>2014-11-26 22:31:41 +0000
committerwiz <wiz>2014-11-26 22:31:41 +0000
commit05323bf8cef7a6bd8d109fd54ceae8a6aa9670c9 (patch)
tree5591050b58e84a0867647008ba646f20837cafd1 /filesystems/fuse-mp3fs/patches/patch-aa
parent3af30e233ee31181586c3baeda888f902ef5f631 (diff)
downloadpkgsrc-05323bf8cef7a6bd8d109fd54ceae8a6aa9670c9.tar.gz
Downgrade to 0.13 since that version works on NetBSD.
Diffstat (limited to 'filesystems/fuse-mp3fs/patches/patch-aa')
-rw-r--r--filesystems/fuse-mp3fs/patches/patch-aa51
1 files changed, 51 insertions, 0 deletions
diff --git a/filesystems/fuse-mp3fs/patches/patch-aa b/filesystems/fuse-mp3fs/patches/patch-aa
new file mode 100644
index 00000000000..3955f3d3a21
--- /dev/null
+++ b/filesystems/fuse-mp3fs/patches/patch-aa
@@ -0,0 +1,51 @@
+$NetBSD: patch-aa,v 1.5 2014/11/26 22:31:41 wiz Exp $
+
+--- src/mp3fs.c.orig 2008-12-14 06:17:35.000000000 +0100
++++ src/mp3fs.c
+@@ -30,7 +30,11 @@
+ #include <fcntl.h>
+ #include <dirent.h>
+ #include <errno.h>
++#if defined (__NetBSD__) || defined (__DragonFly__)
++#include <sys/statvfs.h>
++#else
+ #include <sys/statfs.h>
++#endif
+
+ #include "transcode.h"
+ #include "talloc.h"
+@@ -195,7 +199,12 @@ static int mp3fs_read(const char *path,
+ return f->Read(f, buf, offset, size);
+ }
+
+-static int mp3fs_statfs(const char *path, struct statfs *stbuf) {
++#if defined (__NetBSD__) || defined (__DragonFly__)
++static int mp3fs_statfs(const char *path, struct statvfs *stbuf)
++#else
++static int mp3fs_statfs(const char *path, struct statfs *stbuf)
++#endif
++{
+ int res;
+ char name[256];
+
+@@ -204,7 +213,11 @@ static int mp3fs_statfs(const char *path
+ strncpy(name, basepath, sizeof(name));
+ strncat(name, path, sizeof(name) - strlen(name));
+
++#if defined (__NetBSD__) || defined (__DragonFly__)
++ res = statvfs(name, stbuf);
++#else
+ res = statfs(name, stbuf);
++#endif
+ if(res == -1)
+ return -errno;
+
+@@ -252,7 +265,7 @@ int main(int argc, char *argv[]) {
+ basepath = argv[1];
+ bitrate = 0;
+
+- rate = strchr(basepath, ',');
++ rate = strrchr(basepath, ',');
+ if(rate) {
+ rate[0] = '\0';
+ bitrate = atoi(rate + 1);