diff --git a/CHANGELOG.md b/CHANGELOG.md index d650a523..aeffca3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - +## Unreleased + +### Fixed +- compilation broken on freebsd ([#461](https://github.com/extrawurst/gitui/issues/461)) ## [0.11.0] - 2020-12-20 diff --git a/Cargo.toml b/Cargo.toml index 8c4370a2..b84c4377 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ anyhow = "1.0.36" unicode-width = "0.1" textwrap = "0.13" -[target.'cfg(target_os = "linux")'.dependencies] +[target.'cfg(all(target_family="unix",not(target_os="macos")))'.dependencies] which = "4.0" # pprof is not available on windows diff --git a/src/clipboard.rs b/src/clipboard.rs index 8b56e3e9..a0492e61 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -1,5 +1,6 @@ use anyhow::{anyhow, Result}; -#[cfg(target_os = "linux")] +#[cfg(target_family = "unix")] +#[cfg(not(target_os = "macos"))] use std::ffi::OsStr; use std::io::Write; use std::process::{Command, Stdio}; @@ -27,7 +28,7 @@ fn execute_copy_command(command: Command, text: &str) -> Result<()> { Ok(()) } -#[cfg(target_os = "linux")] +#[cfg(all(target_family = "unix", not(target_os = "macos")))] fn gen_command( path: impl AsRef, xclip_syntax: bool, @@ -42,7 +43,7 @@ fn gen_command( c } -#[cfg(target_os = "linux")] +#[cfg(all(target_family = "unix", not(target_os = "macos")))] pub fn copy_string(string: &str) -> Result<()> { use std::path::PathBuf; use which::which;