summaryrefslogtreecommitdiff
path: root/patches/mingwrt_file64.diff
blob: 0bb5f879e4a8ee171d698a3dbcdfc990cfaaedd1 (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
diff -ur mingwrt-3.18-mingw32.orig/include/io.h mingwrt-3.18-mingw32/include/io.h
--- mingwrt-3.18-mingw32.orig/include/io.h	2010-03-07 04:28:36 +0100
+++ mingwrt-3.18-mingw32/include/io.h	2010-03-22 02:09:26 +0100
@@ -484,6 +484,10 @@
 
 #endif	/* Not _NO_OLDNAMES */
 
+#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+#define lseek _lseeki64
+#endif
+
 #ifdef	__cplusplus
 }
 #endif
diff -ur mingwrt-3.18-mingw32.orig/include/sys/stat.h mingwrt-3.18-mingw32/include/sys/stat.h
--- mingwrt-3.18-mingw32.orig/include/sys/stat.h	2010-03-07 04:28:37 +0100
+++ mingwrt-3.18-mingw32/include/sys/stat.h	2010-03-22 02:09:26 +0100
@@ -270,6 +270,13 @@
 #endif /* _WSTAT_DEFIND */
 #endif /* __MSVCRT__ */
 
+#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+#undef stat
+#define stat  _stati64
+#define fstat _fstati64
+#define wstat _wstati64
+#endif
+
 #ifdef	__cplusplus
 }
 #endif
diff -ur mingwrt-3.18-mingw32.orig/include/sys/types.h mingwrt-3.18-mingw32/include/sys/types.h
--- mingwrt-3.18-mingw32.orig/include/sys/types.h	2010-03-07 04:28:37 +0100
+++ mingwrt-3.18-mingw32/include/sys/types.h	2010-03-22 02:09:26 +0100
@@ -49,7 +49,11 @@
 
 #ifndef	_OFF_T_
 #define	_OFF_T_
+#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+typedef long long _off_t;
+#else
 typedef long _off_t;
+#endif
 
 #ifndef	_NO_OLDNAMES
 typedef _off_t	off_t;