_stat64 is a function, __stat64 is the structure
diff --git a/src/win32/msvc-compat.h b/src/win32/msvc-compat.h
index 50865ed..f79acaa 100644
--- a/src/win32/msvc-compat.h
+++ b/src/win32/msvc-compat.h
@@ -15,7 +15,7 @@
# define R_OK 4 /* read mode check */
# define lseek _lseeki64
-# define stat _stat64
+# define stat __stat64
# define fstat _fstat64
/* stat: file mode type testing macros */