Remove obsolete workaround for strftime on BSD

This was added in libc 0.2.152, see aff5e66e54
This commit is contained in:
Fabian Boehm 2024-09-24 21:38:15 +02:00
parent 798150ac39
commit 48a6550688

View file

@ -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(