summaryrefslogtreecommitdiff
path: root/package/dosfstools/patches/patch-src_mkfs_fat_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-26 13:39:29 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-26 13:39:29 +0100
commitd5976f324b0dc931132c3788279bb3f2c668643e (patch)
treeb179e15497e2e649dc423d87e53c830607e1df13 /package/dosfstools/patches/patch-src_mkfs_fat_c
parent3f794fad83e51a090191803aa54f4a7fe0d5a2ef (diff)
fix musl compile s#loff_t#off_t#
Diffstat (limited to 'package/dosfstools/patches/patch-src_mkfs_fat_c')
-rw-r--r--package/dosfstools/patches/patch-src_mkfs_fat_c56
1 files changed, 56 insertions, 0 deletions
diff --git a/package/dosfstools/patches/patch-src_mkfs_fat_c b/package/dosfstools/patches/patch-src_mkfs_fat_c
new file mode 100644
index 000000000..60703d5f5
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_mkfs_fat_c
@@ -0,0 +1,56 @@
+--- dosfstools-3.0.26.orig/src/mkfs.fat.c 2014-02-08 18:53:10.000000000 +0100
++++ dosfstools-3.0.26/src/mkfs.fat.c 2014-03-26 13:37:51.000000000 +0100
+@@ -300,7 +300,7 @@ static long do_check(char *buffer, int t
+ static void alarm_intr(int alnum);
+ static void check_blocks(void);
+ static void get_list_blocks(char *filename);
+-static int valid_offset(int fd, loff_t offset);
++static int valid_offset(int fd, off_t offset);
+ static uint64_t count_blocks(char *filename, int *remainder);
+ static void check_mount(char *device_name);
+ static void establish_params(int device_num, int size);
+@@ -477,7 +477,7 @@ static void get_list_blocks(char *filena
+ /* Given a file descriptor and an offset, check whether the offset is a valid offset for the file - return FALSE if it
+ isn't valid or TRUE if it is */
+
+-static int valid_offset(int fd, loff_t offset)
++static int valid_offset(int fd, off_t offset)
+ {
+ char ch;
+
+@@ -492,7 +492,7 @@ static int valid_offset(int fd, loff_t o
+
+ static uint64_t count_blocks(char *filename, int *remainder)
+ {
+- loff_t high, low;
++ off_t high, low;
+ int fd;
+
+ if ((fd = open(filename, O_RDONLY)) < 0) {
+@@ -506,7 +506,7 @@ static uint64_t count_blocks(char *filen
+ for (high = 1; valid_offset(fd, high); high *= 2)
+ low = high;
+ while (low < high - 1) {
+- const loff_t mid = (low + high) / 2;
++ const off_t mid = (low + high) / 2;
+ if (valid_offset(fd, mid))
+ low = mid;
+ else
+@@ -1299,7 +1299,7 @@ static void setup_tables(void)
+
+ #define seekto(pos,errstr) \
+ do { \
+- loff_t __pos = (pos); \
++ off_t __pos = (pos); \
+ if (llseek (dev, __pos, SEEK_SET) != __pos) \
+ error ("seek to " errstr " failed whilst writing tables"); \
+ } while(0)
+@@ -1679,7 +1679,7 @@ int main(int argc, char **argv)
+ exit(1); /* The error exit code is 1! */
+ }
+ } else {
+- loff_t offset = blocks * BLOCK_SIZE - 1;
++ off_t offset = blocks * BLOCK_SIZE - 1;
+ char null = 0;
+ /* create the file */
+ dev = open(device_name, O_EXCL | O_RDWR | O_CREAT | O_TRUNC, 0666);