diff --git a/src/d_main.c b/src/d_main.c
index 3dc1c69d7e743a1efc7fd144db7a1ede91558edd..160249ac7aed2fe956421cde3609cc8b9e4db925 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -99,6 +99,9 @@ int	snprintf(char *str, size_t n, const char *fmt, ...);
 #include "lua_script.h"
 #endif
 
+
+FILE *debugfile;
+
 // platform independant focus loss
 UINT8 window_notinfocus = false;