add CI for mips-musl
and fix the statvfs struct for this target
diff --git a/.travis.yml b/.travis.yml
index d0e9591..47a50c7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -80,6 +80,9 @@
env: TARGET=powerpc64-unknown-linux-gnu
rust: stable
- os: linux
+ env: TARGET=mips-unknown-linux-musl
+ rust: stable
+ - os: linux
env: TARGET=mipsel-unknown-linux-musl
rust: stable
diff --git a/ci/docker/mips-unknown-linux-musl/Dockerfile b/ci/docker/mips-unknown-linux-musl/Dockerfile
new file mode 100644
index 0000000..06bd136
--- /dev/null
+++ b/ci/docker/mips-unknown-linux-musl/Dockerfile
@@ -0,0 +1,14 @@
+FROM ubuntu:16.04
+
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+ gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
+ bzip2
+
+RUN mkdir /toolchain
+RUN curl -L https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
+ tar xjf - -C /toolchain --strip-components=2
+
+ENV PATH=$PATH:/rust/bin:/toolchain/bin \
+ CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
+ CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index fbe0e67..7c91dc1 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -126,9 +126,12 @@
pub f_files: ::fsfilcnt_t,
pub f_ffree: ::fsfilcnt_t,
pub f_favail: ::fsfilcnt_t,
+ #[cfg(target_endian = "little")]
pub f_fsid: ::c_ulong,
#[cfg(target_pointer_width = "32")]
pub __f_unused: ::c_int,
+ #[cfg(target_endian = "big")]
+ pub f_fsid: ::c_ulong,
pub f_flag: ::c_ulong,
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],