From d5976f324b0dc931132c3788279bb3f2c668643e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 26 Mar 2014 13:39:29 +0100 Subject: fix musl compile s#loff_t#off_t# --- package/dosfstools/patches/patch-src_io_c | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 package/dosfstools/patches/patch-src_io_c (limited to 'package/dosfstools/patches/patch-src_io_c') diff --git a/package/dosfstools/patches/patch-src_io_c b/package/dosfstools/patches/patch-src_io_c new file mode 100644 index 000000000..fae1ce625 --- /dev/null +++ b/package/dosfstools/patches/patch-src_io_c @@ -0,0 +1,59 @@ +--- dosfstools-3.0.26.orig/src/io.c 2014-01-17 07:07:14.000000000 +0100 ++++ dosfstools-3.0.26/src/io.c 2014-03-26 13:27:02.000000000 +0100 +@@ -48,7 +48,7 @@ + + typedef struct _change { + void *data; +- loff_t pos; ++ off_t pos; + int size; + struct _change *next; + } CHANGE; +@@ -60,7 +60,7 @@ unsigned device_no; + + #ifdef __DJGPP__ + #include "volume.h" /* DOS lowlevel disk access functions */ +-loff_t llseek(int fd, loff_t offset, int whence) ++off_t llseek(int fd, off_t offset, int whence) + { + if ((whence != SEEK_SET) || (fd == 4711)) + return -1; /* only those supported */ +@@ -72,9 +72,9 @@ loff_t llseek(int fd, loff_t offset, int + #define read(a,b,c) ReadVolume(b,c) + #define write(a,b,c) WriteVolume(b,c) + #else +-loff_t llseek(int fd, loff_t offset, int whence) ++off_t llseek(int fd, off_t offset, int whence) + { +- return (loff_t) lseek64(fd, (off64_t) offset, whence); ++ return (off_t) lseek64(fd, (off64_t) offset, whence); + } + #endif + +@@ -118,7 +118,7 @@ void fs_open(char *path, int rw) + * @param[in] size Number of bytes to read + * @param[out] data Where to put the data read + */ +-void fs_read(loff_t pos, int size, void *data) ++void fs_read(off_t pos, int size, void *data) + { + CHANGE *walk; + int got; +@@ -145,7 +145,7 @@ void fs_read(loff_t pos, int size, void + } + } + +-int fs_test(loff_t pos, int size) ++int fs_test(off_t pos, int size) + { + void *scratch; + int okay; +@@ -158,7 +158,7 @@ int fs_test(loff_t pos, int size) + return okay; + } + +-void fs_write(loff_t pos, int size, void *data) ++void fs_write(off_t pos, int size, void *data) + { + CHANGE *new; + int did; -- cgit v1.2.3