[libvirt PATCH] meson: add winsock2 library on windows builds

Daniel P. Berrangé berrange at redhat.com
Wed Dec 2 11:06:26 UTC 2020


If building for windows with curl disabled we get build failures due to
missing ws2_32 library needed for winsock2.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meson.build b/meson.build
index 01e7fbd409..b280809a65 100644
--- a/meson.build
+++ b/meson.build
@@ -1368,10 +1368,12 @@ libutil_dep = cc.find_library('util', required: false)
 if host_machine.system() == 'windows'
   ole32_dep = cc.find_library('ole32')
   oleaut32_dep = cc.find_library('oleaut32')
+  winsock2_dep = cc.find_library('ws2_32')
   win32_dep = declare_dependency(
     dependencies: [
       ole32_dep,
       oleaut32_dep,
+      winsock2_dep,
     ],
   )
   if get_option('default_library') == 'static'
-- 
2.28.0




More information about the libvir-list mailing list