diff --git a/src/base/platform/time.cc b/src/base/platform/time.cc
index c2d36cc2..1948d0db 100644
--- a/src/base/platform/time.cc
+++ b/src/base/platform/time.cc
@@ -864,6 +864,12 @@ void ThreadTicks::WaitUntilInitializedWin() {
 #endif
 }
 
+#ifdef __MINGW64_VERSION_MAJOR
+extern "C" {
+  extern unsigned __int64 __rdtsc(void);
+}
+#endif
+
 #ifndef V8_HOST_ARCH_ARM64
 double ThreadTicks::TSCTicksPerSecond() {
   DCHECK(IsSupported());
