]> rtime.felk.cvut.cz Git - git.git/blobdiff - compat/mingw.h
MSVC: Fix an "incompatible pointer types" compiler warning
[git.git] / compat / mingw.h
index a105dc9a271bdddc14b5de4c20cd94cc404a72d4..afe12ea55469f7a40e35edf8bcf8493e91e0980c 100644 (file)
@@ -209,13 +209,15 @@ int mingw_getpagesize(void);
  * mingw_fstat() instead of fstat() on Windows.
  */
 #define off_t off64_t
-#define stat _stati64
 #define lseek _lseeki64
+#ifndef ALREADY_DECLARED_STAT_FUNCS
+#define stat _stati64
 int mingw_lstat(const char *file_name, struct stat *buf);
 int mingw_fstat(int fd, struct stat *buf);
 #define fstat mingw_fstat
 #define lstat mingw_lstat
 #define _stati64(x,y) mingw_lstat(x,y)
+#endif
 
 int mingw_utime(const char *file_name, const struct utimbuf *times);
 #define utime mingw_utime