summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 35df53402..29a61a7f8 100644
--- a/src/common.h
+++ b/src/common.h
@@ -25,6 +25,7 @@
#include <string.h>
#include <sys/types.h>
+#include <sys/stat.h>
#ifdef GIT_WIN32
@@ -51,6 +52,23 @@ typedef SSIZE_T ssize_t;
# define R_OK 4 /* read mode check */
# endif
+#if defined(__MINGW32__)
+
+# define off_t off64_t
+# define lseek _lseeki64
+# define stat _stati64
+# define fstat _fstati64
+
+#elif defined(_MSC_VER)
+
+typedef __int64 off64_t;
+# define off_t off64_t
+# define lseek _lseeki64
+# define stat _stat64
+# define fstat _fstat64
+
+#endif
+
#else
# include <unistd.h>