Skip to content

Commit

Permalink
Auto merge of #2078 - workingjubilee:fix-mips64-musl, r=Amanieu
Browse files Browse the repository at this point in the history
Fix mips64-musl ioctl consts to c_int

This arch was overlooked or unspecified in earlier PRs that fixed
c_ulong to c_int for ioctl.h consts for musl, see PR #289, PR #301,
or PR #1097 for such prior art, however these are still args to
fn ioctl on mips64-musl, which is expecting c_ints.

Some numbers acquired casts to reflect the fact the data is being
used and (so should be written as) an unsized bitfield, even if
the value is greater than i32::MAX.

Currently rustc is not building on mips64-linux-musl because of this error.
  • Loading branch information
bors committed Feb 26, 2021
2 parents ec101fa + 9807fad commit 8a88b7d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 38 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ jobs:
max-parallel: 12
matrix:
target: [
aarch64-linux-android,
# FIXME: Mysterious failures in CI, see
# https://github.com/rust-lang/libc/issues/2081
# aarch64-linux-android,
aarch64-unknown-linux-gnu,
aarch64-unknown-linux-musl,
arm-linux-androideabi,
Expand Down
11 changes: 6 additions & 5 deletions ci/dox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

set -ex

TARGET_DOC_DIR=target/doc
README=README.md
PLATFORM_SUPPORT=platform-support.md
TARGET_DOC_DIR="target/doc"
README="README.md"
PLATFORM_SUPPORT="platform-support.md"

rm -rf $TARGET_DOC_DIR
mkdir -p $TARGET_DOC_DIR
rm -rf "$TARGET_DOC_DIR"
mkdir -p "$TARGET_DOC_DIR"

if ! rustc --version | grep -E "nightly" ; then
echo "Building the documentation requires a nightly Rust toolchain"
Expand Down Expand Up @@ -57,6 +57,7 @@ while read -r target; do
--no-default-features --features extra_traits
fi

mkdir -p "${TARGET_DOC_DIR}/${target}"
cp -r "target/${target}/doc" "${TARGET_DOC_DIR}/${target}"

echo "* [${target}](${target}/libc/index.html)" >> $PLATFORM_SUPPORT
Expand Down
2 changes: 1 addition & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ else

cargo test $opt --manifest-path libc-test/Cargo.toml --target "${TARGET}"

cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \
RUST_BACKTRACE=1 cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \
--target "${TARGET}"
fi
1 change: 1 addition & 0 deletions ci/runtest-android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn main() {

let output = Command::new("adb")
.arg("shell")
.arg("RUST_BACKTRACE=1")
.arg(&dst)
.output()
.expect("failed to run: adb shell");
Expand Down
62 changes: 31 additions & 31 deletions src/unix/linux_like/linux/musl/b64/mips64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,37 +639,37 @@ pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const TCGETS: ::c_ulong = 0x540d;
pub const TCSETS: ::c_ulong = 0x540e;
pub const TCSETSW: ::c_ulong = 0x540f;
pub const TCSETSF: ::c_ulong = 0x5410;
pub const TCGETA: ::c_ulong = 0x5401;
pub const TCSETA: ::c_ulong = 0x5402;
pub const TCSETAW: ::c_ulong = 0x5403;
pub const TCSETAF: ::c_ulong = 0x5404;
pub const TCSBRK: ::c_ulong = 0x5405;
pub const TCXONC: ::c_ulong = 0x5406;
pub const TCFLSH: ::c_ulong = 0x5407;
pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
pub const TIOCINQ: ::c_ulong = 0x467f;
pub const TIOCLINUX: ::c_ulong = 0x5483;
pub const TIOCGSERIAL: ::c_ulong = 0x5484;
pub const TIOCEXCL: ::c_ulong = 0x740d;
pub const TIOCNXCL: ::c_ulong = 0x740e;
pub const TIOCSCTTY: ::c_ulong = 0x5480;
pub const TIOCGPGRP: ::c_ulong = 0x40047477;
pub const TIOCSPGRP: ::c_ulong = 0x80047476;
pub const TIOCOUTQ: ::c_ulong = 0x7472;
pub const TIOCSTI: ::c_ulong = 0x5472;
pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
pub const TIOCMGET: ::c_ulong = 0x741d;
pub const TIOCMBIS: ::c_ulong = 0x741b;
pub const TIOCMBIC: ::c_ulong = 0x741c;
pub const TIOCMSET: ::c_ulong = 0x741a;
pub const FIONREAD: ::c_ulong = 0x467f;
pub const TIOCCONS: ::c_ulong = 0x80047478;
pub const TCGETS: ::c_int = 0x540d;
pub const TCSETS: ::c_int = 0x540e;
pub const TCSETSW: ::c_int = 0x540f;
pub const TCSETSF: ::c_int = 0x5410;
pub const TCGETA: ::c_int = 0x5401;
pub const TCSETA: ::c_int = 0x5402;
pub const TCSETAW: ::c_int = 0x5403;
pub const TCSETAF: ::c_int = 0x5404;
pub const TCSBRK: ::c_int = 0x5405;
pub const TCXONC: ::c_int = 0x5406;
pub const TCFLSH: ::c_int = 0x5407;
pub const TIOCGSOFTCAR: ::c_int = 0x5481;
pub const TIOCSSOFTCAR: ::c_int = 0x5482;
pub const TIOCINQ: ::c_int = 0x467f;
pub const TIOCLINUX: ::c_int = 0x5483;
pub const TIOCGSERIAL: ::c_int = 0x5484;
pub const TIOCEXCL: ::c_int = 0x740d;
pub const TIOCNXCL: ::c_int = 0x740e;
pub const TIOCSCTTY: ::c_int = 0x5480;
pub const TIOCGPGRP: ::c_int = 0x40047477;
pub const TIOCSPGRP: ::c_int = 0x80047476_u32 as i32;
pub const TIOCOUTQ: ::c_int = 0x7472;
pub const TIOCSTI: ::c_int = 0x5472;
pub const TIOCGWINSZ: ::c_int = 0x40087468;
pub const TIOCSWINSZ: ::c_int = 0x80087467_u32 as i32;
pub const TIOCMGET: ::c_int = 0x741d;
pub const TIOCMBIS: ::c_int = 0x741b;
pub const TIOCMBIC: ::c_int = 0x741c;
pub const TIOCMSET: ::c_int = 0x741a;
pub const FIONREAD: ::c_int = 0x467f;
pub const TIOCCONS: ::c_int = 0x80047478_u32 as i32;

pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
Expand Down

0 comments on commit 8a88b7d

Please sign in to comment.