From e9aaa7b067903040acd7f3d7c685de94b3b98450 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Mon, 7 Feb 2022 13:34:26 +0200 Subject: [PATCH] melib/datetime: use *const c_char instead of *const i8 for portability Using *const i8 broke compatibility with arm64. Fixes #127 --- melib/src/datetime.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/melib/src/datetime.rs b/melib/src/datetime.rs index 3377eaabb..1d12ada21 100644 --- a/melib/src/datetime.rs +++ b/melib/src/datetime.rs @@ -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")