melib/datetime: use *const c_char instead of *const i8 for portability
Using *const i8 broke compatibility with arm64. Fixes #127tables
parent
d4b690d5d3
commit
e9aaa7b067
|
@ -166,7 +166,7 @@ pub fn timestamp_to_string(timestamp: UnixTimestamp, fmt: Option<&str>, posix: b
|
|||
Some(
|
||||
Locale::new(
|
||||
libc::LC_TIME,
|
||||
b"C\0".as_ptr() as *const i8,
|
||||
b"C\0".as_ptr() as *const std::os::raw::c_char,
|
||||
std::ptr::null_mut(),
|
||||
)
|
||||
.chain_err_summary(|| "Could not set locale for datetime conversion")
|
||||
|
@ -306,7 +306,7 @@ where
|
|||
let ret = {
|
||||
let _with_locale = Locale::new(
|
||||
libc::LC_TIME,
|
||||
b"C\0".as_ptr() as *const i8,
|
||||
b"C\0".as_ptr() as *const std::os::raw::c_char,
|
||||
std::ptr::null_mut(),
|
||||
)
|
||||
.chain_err_summary(|| "Could not set locale for datetime conversion")
|
||||
|
@ -367,7 +367,7 @@ where
|
|||
let ret = {
|
||||
let _with_locale = Locale::new(
|
||||
libc::LC_TIME,
|
||||
b"C\0".as_ptr() as *const i8,
|
||||
b"C\0".as_ptr() as *const std::os::raw::c_char,
|
||||
std::ptr::null_mut(),
|
||||
)
|
||||
.chain_err_summary(|| "Could not set locale for datetime conversion")
|
||||
|
|
Loading…
Reference in New Issue