diff -Naur tk8.6.5-orig/win/tkWin32Dll.c tk8.6.5/win/tkWin32Dll.c
--- tk8.6.5-orig/win/tkWin32Dll.c	2014-02-10 23:03:05.000000000 +0400
+++ tk8.6.5/win/tkWin32Dll.c	2016-03-03 09:21:53.742037200 +0300
@@ -12,7 +12,7 @@
 #include "tkWinInt.h"
 #ifndef STATIC_BUILD
 
-#ifdef HAVE_NO_SEH
+#if defined(HAVE_NO_SEH) && __MINGW64_VERSION_MAJOR < 3
 
 /*
  * Unlike Borland and Microsoft, we don't register exception handlers by
