From 41ccfed4c9f1b5f6eff2dd58d58a33e75486566e Mon Sep 17 00:00:00 2001 From: Joni Savage Date: Wed, 2 Sep 2026 16:17:04 +0530 Subject: [PATCH] Added freebsd to allowed targets. --- Cargo.toml | 2 +- src/alsa.rs | 2 +- src/lib.rs | 3 ++- src/pulse.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c83508d..a554cec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ features = [ "AudioDestinationNode" ] -[target.'cfg(target_os = "linux")'.dependencies] +[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] alsa-sys = { version = "0.3.1", optional = true } libpulse-sys = { version = "1.23.0", optional = true } diff --git a/src/alsa.rs b/src/alsa.rs index 258b996..9bf76fc 100644 --- a/src/alsa.rs +++ b/src/alsa.rs @@ -1,6 +1,6 @@ //! Linux output device via `alsa`. -#![cfg(all(target_os = "linux", feature = "alsa"))] +#![cfg(all(any(target_os = "linux", target_os = "freebsd"), feature = "alsa"))] use crate::{AudioOutputDevice, BaseAudioOutputDevice, OutputDeviceParameters}; use alsa_sys::*; diff --git a/src/lib.rs b/src/lib.rs index 9a3a4e0..8f3aa54 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -133,7 +133,7 @@ where )?)); } - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "freebsd"))] { #[cfg(feature = "alsa")] { @@ -176,6 +176,7 @@ where #[cfg(not(any( target_os = "windows", target_os = "linux", + target_os = "freebsd", target_os = "android", target_os = "macos", target_os = "ios", diff --git a/src/pulse.rs b/src/pulse.rs index 60b0149..e986c1b 100644 --- a/src/pulse.rs +++ b/src/pulse.rs @@ -1,6 +1,6 @@ //! Linux output device via `PulseAudio`. -#![cfg(all(target_os = "linux", feature = "pulse"))] +#![cfg(all(any(target_os = "linux", target_os = "freebsd"), feature = "pulse"))] #![cfg_attr(feature = "alsa", allow(dead_code))] use crate::{AudioOutputDevice, BaseAudioOutputDevice, OutputDeviceParameters};