fixed compilation of ncurses crate on arm64
Alexander Kjäll
4 years ago
|
0 |
fixed compilation on arm64
|
|
0 |
diff --git a/src/menu/wrapper.rs b/src/menu/wrapper.rs
|
|
1 |
index fd4b2f9..b5d72ec 100644
|
|
2 |
--- a/src/menu/wrapper.rs
|
|
3 |
+++ b/src/menu/wrapper.rs
|
|
4 |
@@ -9,6 +9,7 @@ use libc::*;
|
|
5 |
use menu::ll;
|
|
6 |
use ll::{WINDOW, chtype, c_bool};
|
|
7 |
use constants::TRUE;
|
|
8 |
+use std::os::raw::c_char;
|
|
9 |
|
|
10 |
pub type MENU = ll::MENU;
|
|
11 |
pub type ITEM = ll::ITEM;
|
|
12 |
@@ -161,11 +162,11 @@ pub fn menu_grey(menu: MENU) -> chtype {
|
|
13 |
#[cfg(feature="menu")]
|
|
14 |
pub fn free_item(item: ITEM) {
|
|
15 |
unsafe {
|
|
16 |
- let name = super::ll::item_name(item) as *mut i8;
|
|
17 |
+ let name = super::ll::item_name(item) as *mut c_char;
|
|
18 |
if name.is_null() == false {
|
|
19 |
let _ = CString::from_raw(name);
|
|
20 |
}
|
|
21 |
- let desc = super::ll::item_description(item) as *mut i8;
|
|
22 |
+ let desc = super::ll::item_description(item) as *mut c_char;
|
|
23 |
if desc.is_null() == false {
|
|
24 |
let _ = CString::from_raw(desc);
|
|
25 |
}
|
|
0 |
fix-compilation-on-arm64.patch
|