summaryrefslogtreecommitdiff
path: root/Build/source/utils/psutils/psutils-1.21-PATCHES/patch-11-WIN32
blob: 2490a1b0642dbaa23f14fb7a08e6344e3adc0693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -ur psutils-1.21.orig/psutil.h psutils-1.21/psutil.h
--- psutils-1.21.orig/psutil.h	2013-10-25 13:06:05.000000000 +0200
+++ psutils-1.21/psutil.h	2013-10-28 10:39:53.000000000 +0100
@@ -26,6 +26,18 @@
 #include <io.h>
 #include <fcntl.h>
 #define SET_BINARY(fp) (void)_setmode(fileno(fp), _O_BINARY)
+#undef off_t
+#undef ftello
+#undef fseeko
+#if defined(__MINGW32__)
+#define off_t off64_t
+#define ftello ftello64
+#define fseeko fseeko64
+#else
+#define off_t __int64
+#define ftello _ftelli64
+#define fseeko _fseeki64
+#endif
 #else /* !WIN32 */
 #define SET_BINARY(fp) (void)0
 #endif