From 48a65506883a76aeea9f8268d039fb630ba82d8d Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 24 Sep 2024 21:38:15 +0200 Subject: [PATCH] Remove obsolete workaround for strftime on BSD This was added in libc 0.2.152, see https://github.com/rust-lang/libc/commit/aff5e66e547372dd29228043e450e9ebb5860257 --- src/history.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/history.rs b/src/history.rs index c48e1d018..417642e52 100644 --- a/src/history.rs +++ b/src/history.rs @@ -1413,17 +1413,6 @@ fn format_history_record( if !unsafe { libc::localtime_r(&seconds, &mut timestamp).is_null() } { const max_tstamp_length: usize = 100; let mut timestamp_str = [0_u8; max_tstamp_length]; - // The libc crate fails to declare strftime on BSD. - #[cfg(bsd)] - extern "C" { - fn strftime( - buf: *mut libc::c_char, - maxsize: usize, - format: *const libc::c_char, - timeptr: *const libc::tm, - ) -> usize; - } - #[cfg(not(bsd))] use libc::strftime; if unsafe { strftime(