]> git.webhop.me Git - bs-cst-neutrino-hd.git/commitdiff
add dvdreadfs patch
authorMarkham <markham001@gmx.de>
Thu, 27 Jun 2024 07:15:00 +0000 (09:15 +0200)
committerMarkham <markham001@gmx.de>
Thu, 27 Jun 2024 07:15:00 +0000 (09:15 +0200)
archive-patches/dvdreadfs/0001-fix-type-mismatch.patch [new file with mode: 0644]

diff --git a/archive-patches/dvdreadfs/0001-fix-type-mismatch.patch b/archive-patches/dvdreadfs/0001-fix-type-mismatch.patch
new file mode 100644 (file)
index 0000000..baf5dea
--- /dev/null
@@ -0,0 +1,55 @@
+--- a/dvdreadfs.c
++++ b/dvdreadfs.c
+@@ -391,7 +391,7 @@ static int fs_open(const char *name, str
+       return res;
+     if (find_file(&mi, name, xfi)) {
+-      fi->fh = xfi;
++      fi->fh = (uintptr_t)xfi;
+       xfi->cache = NULL;
+       xfi->cache_len = 0;
+@@ -415,7 +415,7 @@ static int fs_open(const char *name, str
+        while (*name == '/')
+            ++name;
+        if (strcmp(name , ".volume_id") == 0) {
+-           fi->fh = xfi;
++           fi->fh = (uintptr_t)xfi;
+            xfi->cache = NULL;
+            xfi->cache_len = 0;
+@@ -423,7 +423,7 @@ static int fs_open(const char *name, str
+            if(xfi->cache = malloc(VOL_ID_SIZE+1)) {
+                xfi->fi=&mi.vol_id_info;
+-               xfi->fi->fd=-1; //read will not work unless fd is set
++               xfi->fi->fd=(dvd_file_t *)-1; //read will not work unless fd is set
+                memcpy(xfi->cache,mi.vol_id,VOL_ID_SIZE+1);
+                fprintf(stderr,"%s\n",xfi->cache);
+                return 0;
+@@ -442,7 +442,7 @@ static int fs_read(const char *path, cha
+                       struct fuse_file_info *fi)
+ {
+     int res;
+-    struct ext_file_info *xfi = fi->fh;
++    struct ext_file_info *xfi = (struct ext_file_info *)(uintptr_t)fi->fh;
+     if (!xfi || !xfi->fi->fd)
+       return -ENOENT;
+@@ -521,14 +521,14 @@ static int fs_read(const char *path, cha
+ static int fs_release(const char *path, struct fuse_file_info *fi) {
+     if (fi->fh) {
+-      struct ext_file_info *xfi = fi->fh;
++      struct ext_file_info *xfi = (struct ext_file_info *)(uintptr_t)fi->fh;
+       if (xfi->cache != NULL) {
+           free(xfi->cache);
+           xfi->cache = NULL;
+       }
+       free(xfi);
+-      fi->fh = NULL;
++      fi->fh = (uintptr_t)NULL;
+       /* Release this file's reference to the dvd */
+       dec_refcnt(&mi);