From 60bd186e21c6b0c641b3342bdc7aa0c003920f2e Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 2 Feb 2023 13:10:15 -0600 Subject: [PATCH] Fix linking errors under FreeBSD The nix crate had all its default features enabled, which included features that are not present under BSD. We should only enable the select subset of crate features that we know are available cross-platform (or else use conditional targeting in Cargo.toml to only enable Linux-only features when compiling for Linux targets). For now, it seems we can just use the nix crate with all features disabled as it still builds under Linux and FreeBSD in this state. --- fish-rust/Cargo.lock | 17 ----------------- fish-rust/Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/fish-rust/Cargo.lock b/fish-rust/Cargo.lock index 850527213..8fa57912a 100644 --- a/fish-rust/Cargo.lock +++ b/fish-rust/Cargo.lock @@ -545,15 +545,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "miette" version = "5.5.0" @@ -619,8 +610,6 @@ dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset", - "pin-utils", ] [[package]] @@ -669,12 +658,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "prettyplease" version = "0.1.23" diff --git a/fish-rust/Cargo.toml b/fish-rust/Cargo.toml index d21a02296..d671ff5da 100644 --- a/fish-rust/Cargo.toml +++ b/fish-rust/Cargo.toml @@ -13,7 +13,7 @@ errno = "0.2.8" inventory = { version = "0.3.3", optional = true} lazy_static = "1.4.0" libc = "0.2.137" -nix = "0.25.0" +nix = { version = "0.25.0", default-features = false, features = [] } num-traits = "0.2.15" unixstring = "0.2.7" widestring = "1.0.2"