diff --git a/compat/mingw.c b/compat/mingw.c index 6f8186a35a..719b2c7192 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -997,6 +997,8 @@ static int do_stat_internal(int follow, const char *file_name, struct stat *buf) return do_lstat(follow, alt_name, buf); } +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; diff --git a/compat/mingw.h b/compat/mingw.h index c79f0eca6f..5298d886b8 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -427,7 +427,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);