[PR #5053] [MERGED] Fix compiling for Windows targets #40938

Closed
opened 2026-07-18 03:38:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/5053
Author: @BlackDex
Created: 10/6/2024
Status: Merged
Merged: 10/6/2024
Merged by: @dani-garcia

Base: mainHead: fix-windows-compile


📝 Commits (1)

  • 1a4a441 Fix compiling for Windows targets

📊 Changes

2 files changed (+7 additions, -5 deletions)

View changed files

📝 Cargo.toml (+1 -1)
📝 src/main.rs (+6 -4)

📄 Description

The unix::signal was also included during Windows compilations. This of course will not work. Fix this by only including it for unix targets.

Also changed all other conditional compilation options to use cfg(unix) instead of cfg(not(windows)). The latter may also include wasm for example, or any other future target family. This way we will only match unix

Fixes #5052


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/5053 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/6/2024 **Status:** ✅ Merged **Merged:** 10/6/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-windows-compile` --- ### 📝 Commits (1) - [`1a4a441`](https://github.com/dani-garcia/vaultwarden/commit/1a4a441b7e0fad4dc1a4e5a8ebf6c08f8a407b32) Fix compiling for Windows targets ### 📊 Changes **2 files changed** (+7 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+1 -1) 📝 `src/main.rs` (+6 -4) </details> ### 📄 Description The `unix::signal` was also included during Windows compilations. This of course will not work. Fix this by only including it for `unix` targets. Also changed all other conditional compilation options to use `cfg(unix)` instead of `cfg(not(windows))`. The latter may also include `wasm` for example, or any other future target family. This way we will only match `unix` Fixes #5052 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-18 03:38:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#40938