+
+#ifdef HAVE_MINGW
+ struct sockaddr_in addr;
+ memset(&addr, 0, sizeof addr);
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = htonl(0x7f000001);
+ addr.sin_port = htons(55555);
+ int option = 1;
+
+ control_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if(control_socket < 0) {
+ logger(LOG_ERR, "Creating control socket failed: %s", sockstrerror(sockerrno));
+ goto bail;
+ }
+
+ setsockopt(control_socket, SOL_SOCKET, SO_REUSEADDR, &option, sizeof option);
+#else