diff --git a/src/win32/win_dbg.c b/src/win32/win_dbg.c
index 23416af1b26672c71232c57cc057467d481f51a2..fe6ebb04ae6545bce5d2c89abf8c8f0a4f882f71 100644
--- a/src/win32/win_dbg.c
+++ b/src/win32/win_dbg.c
@@ -20,7 +20,9 @@
 
 
 #include <tchar.h>
+#ifndef HAVE_SDL
 #include "win_main.h"
+#endif
 #include "../doomdef.h" //just for VERSION
 #include "win_dbg.h"
 #include "../m_argv.h" //print the parameter in the log