summaryrefslogtreecommitdiff
path: root/package/dosfstools/patches/patch-src_io_c
blob: f8cd3414280260a1f1c86b41ea4b09e298107efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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-05-05 13:34:45.000000000 +0200
@@ -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;