summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c1
-rw-r--r--compat/mingw.h9
2 files changed, 9 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 22ee9ef1cf..fecb98bcff 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -491,7 +491,6 @@ int mingw_stat(const char *file_name, struct stat *buf)
return do_stat_internal(1, file_name, buf);
}
-#undef fstat
int mingw_fstat(int fd, struct stat *buf)
{
HANDLE fh = (HANDLE)_get_osfhandle(fd);
diff --git a/compat/mingw.h b/compat/mingw.h
index 3c3a9d925e..19d82de41a 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -271,11 +271,20 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
#define lseek _lseeki64
/* use struct stat with 64 bit st_size */
+#ifdef stat
+#undef stat
+#endif
#define stat _stati64
int mingw_lstat(const char *file_name, struct stat *buf);
int mingw_stat(const char *file_name, struct stat *buf);
int mingw_fstat(int fd, struct stat *buf);
+#ifdef fstat
+#undef fstat
+#endif
#define fstat mingw_fstat
+#ifdef lstat
+#undef lstat
+#endif
#define lstat mingw_lstat
#ifndef _stati64