--- rocksdb-6.6.4/port/win/env_win.cc.orig	2020-03-05 09:14:45.306375300 +0300
+++ rocksdb-6.6.4/port/win/env_win.cc	2020-03-05 09:17:49.253263400 +0300
@@ -97,9 +97,16 @@
 
   HMODULE module = GetModuleHandle("kernel32.dll");
   if (module != NULL) {
+#if defined(__MINGW32__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
     GetSystemTimePreciseAsFileTime_ =
       (FnGetSystemTimePreciseAsFileTime)GetProcAddress(
           module, "GetSystemTimePreciseAsFileTime");
+#if defined(__MINGW32__)
+#pragma GCC diagnostic pop
+#endif
   }
 }
 
