From cff4504c730631e35d74f2e8dd21d4a6681e3d12 Mon Sep 17 00:00:00 2001
From: Matt Borgerson <contact@mborgerson.com>
Date: Sat, 28 Dec 2024 14:57:30 -0700
Subject: [PATCH] meson.build: Don't try to link pthreads on Windows

---
 meson.build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index a6fd6fa5a3..4a856d30f1 100644
--- a/meson.build
+++ b/meson.build
@@ -388,7 +388,13 @@ have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_
 
 # Target-specific libraries and flags
 libm = cc.find_library('m', required: false)
-threads = dependency('threads')
+
+if targetos == 'windows'
+  threads = dependency('', required: false)
+else
+  threads = dependency('threads')
+endif
+
 util = cc.find_library('util', required: false)
 winmm = []
 socket = []