#endif
#include "server.h"
-#include "target.h"
+#include <target/target.h>
#include "openocd.h"
#include "tcl_server.h"
#include "telnet_server.h"
}
#endif
-int server_init(struct command_context *cmd_ctx)
+int server_preinit(void)
{
+ /* this currently only calls WSAStartup on native win32 systems
+ * before any socket operations are performed.
+ * This is an issue if you call init in your config script */
+
#ifdef _WIN32
WORD wVersionRequested;
WSADATA wsaData;
signal(SIGABRT, sig_handler);
#endif
+ return ERROR_OK;
+}
+
+int server_init(struct command_context *cmd_ctx)
+{
int ret = tcl_init(cmd_ctx);
if (ERROR_OK != ret)
return ret;