From 7e4f795a53aee93add100f74f4b84bf24b04848a Mon Sep 17 00:00:00 2001 From: Daggerbot Date: Wed, 4 Nov 2015 08:21:42 -0800 Subject: Change some uses of c_void to avoid libc version conflicts. --- src/api/osmesa/mod.rs | 2 +- src/api/x11/window.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/osmesa/mod.rs b/src/api/osmesa/mod.rs index c41c997..065ffc6 100644 --- a/src/api/osmesa/mod.rs +++ b/src/api/osmesa/mod.rs @@ -89,7 +89,7 @@ impl GlContext for OsMesaContext { #[inline] unsafe fn make_current(&self) -> Result<(), ContextError> { let ret = osmesa_sys::OSMesaMakeCurrent(self.context, self.buffer.as_ptr() - as *mut libc::c_void, 0x1401, self.width + as *mut _, 0x1401, self.width as libc::c_int, self.height as libc::c_int); // an error can only happen in case of invalid parameter, which would indicate a bug diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index 0196f67..72b9b33 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -354,8 +354,8 @@ impl Window { Glx(::api::glx::ContextPrototype<'a>), Egl(::api::egl::ContextPrototype<'a>), } - let builder_clone_opengl_glx = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME: - let builder_clone_opengl_egl = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME: + let builder_clone_opengl_glx = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME: + let builder_clone_opengl_egl = opengl.clone().map_sharing(|_| unimplemented!()); // FIXME: let context = match opengl.version { GlRequest::Latest | GlRequest::Specific(Api::OpenGl, _) | GlRequest::GlThenGles { .. } => { // GLX should be preferred over EGL, otherwise crashes may occur @@ -521,7 +521,7 @@ impl Window { (*hint).res_name = c_name as *mut libc::c_char; (*hint).res_class = c_name as *mut libc::c_char; (display.xlib.XSetClassHint)(display.display, window, hint); - (display.xlib.XFree)(hint as *mut libc::c_void); + (display.xlib.XFree)(hint as *mut _); }); } -- cgit v1.2.3