melib/datetime: use *const c_char instead of *const i8 for portability

Using *const i8 broke compatibility with arm64.

Fixes #127
tables
Manos Pitsidianakis 2022-02-07 13:34:26 +02:00
parent d4b690d5d3
commit e9aaa7b067
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 3 additions and 3 deletions

View File

@ -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")