mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Remove obsolete workaround for strftime on BSD
This was added in libc 0.2.152, see aff5e66e54
This commit is contained in:
parent
798150ac39
commit
48a6550688
1 changed files with 0 additions and 11 deletions
|
@ -1413,17 +1413,6 @@ fn format_history_record(
|
||||||
if !unsafe { libc::localtime_r(&seconds, &mut timestamp).is_null() } {
|
if !unsafe { libc::localtime_r(&seconds, &mut timestamp).is_null() } {
|
||||||
const max_tstamp_length: usize = 100;
|
const max_tstamp_length: usize = 100;
|
||||||
let mut timestamp_str = [0_u8; max_tstamp_length];
|
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;
|
use libc::strftime;
|
||||||
if unsafe {
|
if unsafe {
|
||||||
strftime(
|
strftime(
|
||||||
|
|
Loading…
Reference in a new issue