From 957d187ae4d2f860b133b49451b2e983fb275c1a Mon Sep 17 00:00:00 2001
From: Denis Krjuchkov <denis@crazydev.net>
Date: Tue, 26 Nov 2013 18:10:18 +0600
Subject: [PATCH] Main.cxx: initialize winsock before creating IO thread

Otherwise sockets can't be created during IO thread initialization.
---
 src/Main.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Main.cxx b/src/Main.cxx
index 3b89e9ffa..83af5d7ea 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -372,8 +372,8 @@ int mpd_main(int argc, char *argv[])
 	g_thread_init(nullptr);
 #endif
 
-	io_thread_init();
 	winsock_init();
+	io_thread_init();
 	config_global_init();
 
 	success = parse_cmdline(argc, argv, &options, error);