From d4c64458db38c98a1de4c461ac666e682456b218 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Fri, 24 Jul 2020 20:27:58 +0800 Subject: [PATCH] Fix ARM compatibility Tested to successfully compile in an arm64v8/debian:buster container (running on an x64 box through qemu-aarch64). Should work on armhf too, though haven't tested yet. --- src/util/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/error.rs b/src/util/error.rs index db52657..d0509d6 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -5,7 +5,7 @@ use std::io; use std::str::from_utf8_unchecked; use ffi::*; -use libc::c_int; +use libc::{c_char, c_int}; #[derive(Copy, Clone)] pub enum Error { @@ -170,8 +170,8 @@ fn index(error: &Error) -> usize { } // XXX: the length has to be synced with the number of errors -static mut STRINGS: [[i8; AV_ERROR_MAX_STRING_SIZE as usize]; 27] = - [[0i8; AV_ERROR_MAX_STRING_SIZE as usize]; 27]; +static mut STRINGS: [[c_char; AV_ERROR_MAX_STRING_SIZE as usize]; 27] = + [[0 as c_char; AV_ERROR_MAX_STRING_SIZE as usize]; 27]; pub fn register_all() { unsafe {