X-Git-Url: https://git.tokkee.org/?p=pkg-fusedav.git;a=blobdiff_plain;f=debian%2Fpatches%2Fbts532763-neon27.dpatch;fp=debian%2Fpatches%2Fbts532763-neon27.dpatch;h=16a938db7277f1006474b7b311d6025efae24890;hp=0000000000000000000000000000000000000000;hb=2fecdd23f96c6e8311d652c8a8097f390d5ae5c1;hpb=a2cbbfb450608f02322a7c7f46f2a29dc99523cd diff --git a/debian/patches/bts532763-neon27.dpatch b/debian/patches/bts532763-neon27.dpatch new file mode 100755 index 0000000..16a938d --- /dev/null +++ b/debian/patches/bts532763-neon27.dpatch @@ -0,0 +1,42 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## bts532763-neon27.dpatch by Sebastian Harl +## +## DP: Added support for neon27. + +@DPATCH@ + +diff a/src/filecache.c b/src/filecache.c +--- a/src/filecache.c ++++ b/src/filecache.c +@@ -233,8 +233,13 @@ fail: + } + + static int load_up_to_unlocked(struct file_info *fi, off_t l) { +- ++#ifndef ne_get_range64 ++#define NE_GET_RANGE ne_get_range ++ ne_content_range range; ++#else ++#define NE_GET_RANGE ne_get_range64 + ne_content_range64 range; ++#endif + ne_session *session; + + assert(fi); +@@ -257,7 +262,7 @@ static int load_up_to_unlocked(struct file_info *fi, off_t l) { + range.end = l-1; + range.total = 0; + +- if (ne_get_range64(session, fi->filename, &range, fi->fd) != NE_OK) { ++ if (NE_GET_RANGE(session, fi->filename, &range, fi->fd) != NE_OK) { + fprintf(stderr, "GET failed: %s\n", ne_get_error(session)); + errno = ENOENT; + return -1; +@@ -265,6 +270,7 @@ static int load_up_to_unlocked(struct file_info *fi, off_t l) { + + fi->present = l; + return 0; ++#undef NE_GET_RANGE + } + + int file_cache_read(void *f, char *buf, size_t size, off_t offset) {