diff --git a/compat/mingw.c b/compat/mingw.c index f2fac5c8b5..f1621d1d91 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -651,6 +651,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 3c80d568c1..b80cf377ba 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -361,7 +361,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)