+#if wxUSE_EVENTLOOP_SOURCE
+
+wxEventLoopSource*
+wxEventLoopBase::AddSourceForFD(int fd,
+ wxEventLoopSourceHandler *handler,
+ int flags)
+{
+#if wxUSE_CONSOLE_EVENTLOOP
+ // Delegate to the event loop sources manager defined by it.
+ wxEventLoopSourcesManagerBase* const
+ manager = wxApp::GetValidTraits().GetEventLoopSourcesManager();
+ wxCHECK_MSG( manager, NULL, wxS("Must have wxEventLoopSourcesManager") );
+
+ return manager->AddSourceForFD(fd, handler, flags);
+#else // !wxUSE_CONSOLE_EVENTLOOP
+ return NULL;
+#endif // wxUSE_CONSOLE_EVENTLOOP/!wxUSE_CONSOLE_EVENTLOOP
+}
+
+#endif // wxUSE_EVENTLOOP_SOURCE
+