diff --git a/compat/mingw-posix.h b/compat/mingw-posix.h index 2362ce6897..1a917890b1 100644 --- a/compat/mingw-posix.h +++ b/compat/mingw-posix.h @@ -404,7 +404,7 @@ int mingw_fstat(int fd, struct stat *buf); #ifdef lstat #undef lstat #endif -#define lstat mingw_lstat +extern int (*lstat)(const char *file_name, struct stat *buf); int mingw_utime(const char *file_name, const struct utimbuf *times); diff --git a/compat/mingw.c b/compat/mingw.c index 2718d5fa5d..5353a6e15e 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1250,6 +1250,8 @@ int mingw_lstat(const char *file_name, struct stat *buf) return -1; } +int (*lstat)(const char *file_name, struct stat *buf) = mingw_lstat; + static int get_file_info_by_handle(HANDLE hnd, struct stat *buf) { BY_HANDLE_FILE_INFORMATION fdata;