diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp
index bb41dc0bb6..d9eaa53f0b 100644
--- a/src/ports/SkScalerContext_win_dw.cpp
+++ b/src/ports/SkScalerContext_win_dw.cpp
@@ -50,6 +50,10 @@
 #include <dwrite_1.h>
 #include <dwrite_3.h>
 
+#if defined(__MINGW32__)
+#define GetGlyphImageFormats GetGlyphImageFormats_
+#endif
+
 namespace {
 static inline const constexpr bool kSkShowTextBlitCoverage = false;
 
