]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block: add missing socket_init() calls to tools
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 25 Aug 2020 10:38:48 +0000 (11:38 +0100)
committerEric Blake <eblake@redhat.com>
Wed, 2 Sep 2020 21:47:39 +0000 (16:47 -0500)
Any tool that uses sockets needs to call socket_init() in order to work
on the Windows platform.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200825103850.119911-2-berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
qemu-img.c
qemu-io.c
qemu-nbd.c

index 5308773811f3044cc6cda07ecea5bad68460bb96..eb2fc1f86243efb4c82bb9e840a5126e04b4fbec 100644 (file)
@@ -41,6 +41,7 @@
 #include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
+#include "qemu/sockets.h"
 #include "qemu/units.h"
 #include "qom/object_interfaces.h"
 #include "sysemu/block-backend.h"
@@ -5410,6 +5411,7 @@ int main(int argc, char **argv)
     signal(SIGPIPE, SIG_IGN);
 #endif
 
+    socket_init();
     error_init(argv[0]);
     module_call_init(MODULE_INIT_TRACE);
     qemu_init_exec_dir(argv[0]);
index 3adc5a7d0d3f77073f4a95684fcec58ad015a289..7cc832b3d6187555cb03ddbc6a98f37b39fc1e03 100644 (file)
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -25,6 +25,7 @@
 #include "qemu/config-file.h"
 #include "qemu/readline.h"
 #include "qemu/log.h"
+#include "qemu/sockets.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qom/object_interfaces.h"
@@ -542,6 +543,7 @@ int main(int argc, char **argv)
     signal(SIGPIPE, SIG_IGN);
 #endif
 
+    socket_init();
     error_init(argv[0]);
     module_call_init(MODULE_INIT_TRACE);
     qemu_init_exec_dir(argv[0]);
index d2657b8db50dab78303cd49a156eac07b51e80f0..b102874f0f46bb06bb98aa392e0fcd197d3668b0 100644 (file)
@@ -599,6 +599,7 @@ int main(int argc, char **argv)
     signal(SIGPIPE, SIG_IGN);
 #endif
 
+    socket_init();
     error_init(argv[0]);
     module_call_init(MODULE_INIT_TRACE);
     qcrypto_init(&error_fatal);