some modifications for WIN32 support :)
[NeonServV5.git] / src / main.c
index 2fcc3dbec18349f0feae58657adb0cb8422dc1d1..0aa1a1bb8b2bec5be0908f34ec345c7ccb5e78e4 100644 (file)
@@ -36,6 +36,18 @@ int main(void)
 {
     start_time = time(0);
     
+    #ifdef WIN32
+    int res;
+    WSADATA wsadata;
+    // Start Windows Sockets.
+    res = WSAStartup(MAKEWORD(2, 0), &wsadata);
+    if (res)
+    {
+        perror("Unable to start Windows Sockets");
+        return 0;
+    }
+    #endif
+    
     init_mysql();
     init_lang();
     init_parser();