From cb689b2ec8098fbf888f3854d73147609cfb7e88 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Sat, 23 Sep 2017 21:12:17 -0700 Subject: [PATCH] Linux/arm compilation fix libc::c_char is u8 rather than i8 there, unlike Linux/x86_64 or OS X. Use correct type to compile on all platforms. --- src/stream.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stream.rs b/src/stream.rs index 7192659..bf7be80 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -31,6 +31,7 @@ use error::Error; use h264; use moonfire_ffmpeg; +use std::os::raw::c_char; use std::ffi::{CStr, CString}; use std::result::Result; use std::sync; @@ -72,7 +73,7 @@ impl Ffmpeg { macro_rules! c_str { ($s:expr) => { { - unsafe { CStr::from_ptr(concat!($s, "\0").as_ptr() as *const i8) } + unsafe { CStr::from_ptr(concat!($s, "\0").as_ptr() as *const c_char) } } } }