From d1ef39bb87239d67b41779c468380392edc9b1f3 Mon Sep 17 00:00:00 2001 From: Bob Van Hove <1587584+bobvh@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:50:51 +0200 Subject: [PATCH] Exclude Windows from the bundled remote-auth server build struct DoltliteServer in the doltlite.c amalgamation uses raw POSIX pthread_t/pthread_mutex_t/pthread_cond_t with no Windows implementation, so MSVC fails to parse the struct (and every later use of it cascades into "undefined struct" errors). Windows builds are client-only and don't need to host the embedded remote-auth TCP server, so exclude Windows from remote_supported the same way wasm32 already is. --- libdoltlite-sys/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libdoltlite-sys/build.rs b/libdoltlite-sys/build.rs index 893f0ad74..1c57d5578 100644 --- a/libdoltlite-sys/build.rs +++ b/libdoltlite-sys/build.rs @@ -111,8 +111,10 @@ mod build_bundled { cfg.define("WIN32_LEAN_AND_MEAN", None); } + // Remote-auth server uses pthreads, unported to Windows/MSVC. let remote_supported = cfg!(feature = "remote") - && !env::var("TARGET").is_ok_and(|target| target.starts_with("wasm32")); + && !env::var("TARGET").is_ok_and(|target| target.starts_with("wasm32")) + && !win_target(); if remote_supported { let remote_dir = Path::new(lib_name).join("remote"); let ed25519_dir = remote_dir.join("ed25519");