fix chardev_init for win32
authorTeLeMan <geleman@gmail.com>
Thu, 15 Apr 2010 04:37:55 +0000 (12:37 +0800)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 18 May 2010 17:56:59 +0000 (19:56 +0200)
chardev_init functions use socket,so socket_init() shoud be placed at
the front of chardev_init on win32.

Signed-off-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vl.c

diff --git a/vl.c b/vl.c
index 85bcc84df29f044c84b4a3e77e7a576567a96735..d77b47c6f7b8a7560830e2b61a3779d4049d4fe3 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3509,6 +3509,8 @@ int main(int argc, char **argv, char **envp)
     if (default_vga)
         vga_interface_type = VGA_CIRRUS;
 
+    socket_init();
+
     if (qemu_opts_foreach(&qemu_chardev_opts, chardev_init_func, NULL, 1) != 0)
         exit(1);
 #ifdef CONFIG_LINUX
@@ -3617,8 +3619,6 @@ int main(int argc, char **argv, char **envp)
     }
     configure_icount(icount_option);
 
-    socket_init();
-
     if (net_init_clients() < 0) {
         exit(1);
     }