Add aarch64-unknown-linux-gnu support

* Adding dependencies
* Replacing `i8` with `c_char` ot `_` (since `c_char` can be
  unsigned on some platforms, aarch64 is one of them)
This commit is contained in:
Akos Kiss 2015-07-22 21:18:50 +00:00
parent eb8611f272
commit 07c8154cb7
3 changed files with 9 additions and 3 deletions

View file

@ -90,3 +90,9 @@ osmesa-sys = "0.0.5"
wayland-client = { version = "0.2.0", features = ["egl", "dlopen"] } wayland-client = { version = "0.2.0", features = ["egl", "dlopen"] }
wayland-kbd = "0.2.0" wayland-kbd = "0.2.0"
x11-dl = "~2.0" x11-dl = "~2.0"
[target.aarch64-unknown-linux-gnu.dependencies]
osmesa-sys = "0.0.5"
wayland-client = { version = "0.2.0", features = ["egl", "dlopen"] }
wayland-kbd = "0.2.0"
x11-dl = "~2.0"

View file

@ -22,7 +22,7 @@ pub fn load(window: &glutin::Window) -> Context {
let gl = gl::Gl::load(window); let gl = gl::Gl::load(window);
let version = unsafe { let version = unsafe {
let data = CStr::from_ptr(gl.GetString(gl::VERSION) as *const i8).to_bytes().to_vec(); let data = CStr::from_ptr(gl.GetString(gl::VERSION) as *const _).to_bytes().to_vec();
String::from_utf8(data).unwrap() String::from_utf8(data).unwrap()
}; };

View file

@ -492,8 +492,8 @@ impl Window {
unsafe { unsafe {
with_c_str(&*builder.title, |c_name| { with_c_str(&*builder.title, |c_name| {
let hint = (display.xlib.XAllocClassHint)(); let hint = (display.xlib.XAllocClassHint)();
(*hint).res_name = c_name as *mut i8; (*hint).res_name = c_name as *mut libc::c_char;
(*hint).res_class = c_name as *mut i8; (*hint).res_class = c_name as *mut libc::c_char;
(display.xlib.XSetClassHint)(display.display, window, hint); (display.xlib.XSetClassHint)(display.display, window, hint);
(display.xlib.XFree)(hint as *mut libc::c_void); (display.xlib.XFree)(hint as *mut libc::c_void);
}); });