diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 64d8035027539713be22d6310855960d9cd94989..a2c5365993c360d0cf5fef1041eac941a017a29b 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -15,6 +15,13 @@ Created 10/21/1995 Heikki Tuuri
 #include "fil0fil.h"
 #include "buf0buf.h"
 
+#if defined(UNIV_HOTBACKUP) && defined(__WIN__)
+/* Add includes for the _stat() call to compile on Windows */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#endif /* UNIV_HOTBACKUP */
+
 #undef HAVE_FDATASYNC
 
 #ifdef POSIX_ASYNC_IO