Skip to content

Commit ceb3152

Browse files
committed
update compliance tests to use NLS support on FreeBSD
1 parent 0b085af commit ceb3152

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/gettext/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ macro_rules! xlat_println {
152152
//These are all defined in POSIX.
153153
#[cfg(feature = "gettext")]
154154
mod gettext_sys {
155+
#[cfg_attr(target_os = "freebsd", link(name = "intl"))]
155156
extern "C" {
156157
pub fn dgettext(
157158
domain: *const libc::c_char,

test-framework/sudo-test/src/docker.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,14 @@ pub fn build_base_image() {
184184
#[allow(clippy::vec_init_then_push)]
185185
let sudo_build_features: String =
186186
env::var("SUDO_BUILD_FEATURES").unwrap_or_else(|_| {
187-
let mut features = vec![];
188-
189-
#[cfg(not(target_os = "freebsd"))]
190-
features.extend(["pam-login", "gettext"]);
191-
192-
#[cfg(feature = "apparmor")]
193-
features.push("apparmor");
194-
195-
features.join(",")
187+
[
188+
"gettext",
189+
#[cfg(not(target_os = "freebsd"))]
190+
"pam-login",
191+
#[cfg(feature = "apparmor")]
192+
"apparmor",
193+
]
194+
.join(",")
196195
});
197196

198197
// On FreeBSD we build sudo-rs outside of the container. There are no pre-made FreeBSD
@@ -201,7 +200,7 @@ pub fn build_base_image() {
201200
if cfg!(target_os = "freebsd") {
202201
// Build sudo-rs
203202
let mut cargo_cmd = StdCommand::new("cargo");
204-
cargo_cmd.args([
203+
cargo_cmd.env("RUSTFLAGS", "-L /usr/local/lib").args([
205204
"build",
206205
"--locked",
207206
"--features",

0 commit comments

Comments
 (0)