#include "wx/unix/execute.h"
 #include "wx/evtloop.h"
 
-#if wxUSE_TIMER
-    #include "wx/unix/private/timer.h"
-#endif // wxUSE_TIMER
+#include "wx/unix/private/timer.h"
 
 // for waitpid()
 #include <sys/types.h>
 
 #endif // wxUSE_TIMER
 
+#if wxUSE_CONSOLE_EVENTLOOP
+
 wxEventLoopBase *wxConsoleAppTraits::CreateEventLoop()
 {
     return new wxEventLoop();
 }
 
+#endif // wxUSE_CONSOLE_EVENTLOOP