diff --git a/compat/mingw.c b/compat/mingw.c index f2b96032ef..47dae5a5ac 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -574,6 +574,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; + int mingw_lstat(const char *file_name, struct stat *buf) { return do_stat_internal(0, file_name, buf); diff --git a/compat/mingw.h b/compat/mingw.h index f2a78b471c..ca9358e93c 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -319,7 +319,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); #ifndef _stati64 # define _stati64(x,y) mingw_stat(x,y)