mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-22 21:19:29 +08:00
Remove obsolete workaround for strftime on BSD
Some checks failed
make test / ubuntu (push) Has been cancelled
make test / ubuntu-32bit-static-pcre2 (push) Has been cancelled
make test / ubuntu-asan (push) Has been cancelled
make test / macos (push) Has been cancelled
Rust checks / rustfmt (push) Has been cancelled
Rust checks / clippy (push) Has been cancelled
Some checks failed
make test / ubuntu (push) Has been cancelled
make test / ubuntu-32bit-static-pcre2 (push) Has been cancelled
make test / ubuntu-asan (push) Has been cancelled
make test / macos (push) Has been cancelled
Rust checks / rustfmt (push) Has been cancelled
Rust checks / clippy (push) Has been cancelled
This was added in libc 0.2.152, see aff5e66e54
This commit is contained in:
parent
798150ac39
commit
48a6550688
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user