Skip to content

Commit 8a88b7d

Browse files
committed
Auto merge of #2078 - workingjubilee:fix-mips64-musl, r=Amanieu
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.
2 parents ec101fa + 9807fad commit 8a88b7d

File tree

5 files changed

+42
-38
lines changed

5 files changed

+42
-38
lines changed

.github/workflows/bors.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ jobs:
103103
max-parallel: 12
104104
matrix:
105105
target: [
106-
aarch64-linux-android,
106+
# FIXME: Mysterious failures in CI, see
107+
# https://github.com/rust-lang/libc/issues/2081
108+
# aarch64-linux-android,
107109
aarch64-unknown-linux-gnu,
108110
aarch64-unknown-linux-musl,
109111
arm-linux-androideabi,

ci/dox.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
set -ex
88

9-
TARGET_DOC_DIR=target/doc
10-
README=README.md
11-
PLATFORM_SUPPORT=platform-support.md
9+
TARGET_DOC_DIR="target/doc"
10+
README="README.md"
11+
PLATFORM_SUPPORT="platform-support.md"
1212

13-
rm -rf $TARGET_DOC_DIR
14-
mkdir -p $TARGET_DOC_DIR
13+
rm -rf "$TARGET_DOC_DIR"
14+
mkdir -p "$TARGET_DOC_DIR"
1515

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

60+
mkdir -p "${TARGET_DOC_DIR}/${target}"
6061
cp -r "target/${target}/doc" "${TARGET_DOC_DIR}/${target}"
6162

6263
echo "* [${target}](${target}/libc/index.html)" >> $PLATFORM_SUPPORT

ci/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,6 @@ else
121121

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

124-
cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \
124+
RUST_BACKTRACE=1 cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \
125125
--target "${TARGET}"
126126
fi

ci/runtest-android.rs

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fn main() {
2727

2828
let output = Command::new("adb")
2929
.arg("shell")
30+
.arg("RUST_BACKTRACE=1")
3031
.arg(&dst)
3132
.output()
3233
.expect("failed to run: adb shell");

src/unix/linux_like/linux/musl/b64/mips64.rs

+31-31
Original file line numberDiff line numberDiff line change
@@ -639,37 +639,37 @@ pub const F_OFD_GETLK: ::c_int = 36;
639639
pub const F_OFD_SETLK: ::c_int = 37;
640640
pub const F_OFD_SETLKW: ::c_int = 38;
641641

642-
pub const TCGETS: ::c_ulong = 0x540d;
643-
pub const TCSETS: ::c_ulong = 0x540e;
644-
pub const TCSETSW: ::c_ulong = 0x540f;
645-
pub const TCSETSF: ::c_ulong = 0x5410;
646-
pub const TCGETA: ::c_ulong = 0x5401;
647-
pub const TCSETA: ::c_ulong = 0x5402;
648-
pub const TCSETAW: ::c_ulong = 0x5403;
649-
pub const TCSETAF: ::c_ulong = 0x5404;
650-
pub const TCSBRK: ::c_ulong = 0x5405;
651-
pub const TCXONC: ::c_ulong = 0x5406;
652-
pub const TCFLSH: ::c_ulong = 0x5407;
653-
pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
654-
pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
655-
pub const TIOCINQ: ::c_ulong = 0x467f;
656-
pub const TIOCLINUX: ::c_ulong = 0x5483;
657-
pub const TIOCGSERIAL: ::c_ulong = 0x5484;
658-
pub const TIOCEXCL: ::c_ulong = 0x740d;
659-
pub const TIOCNXCL: ::c_ulong = 0x740e;
660-
pub const TIOCSCTTY: ::c_ulong = 0x5480;
661-
pub const TIOCGPGRP: ::c_ulong = 0x40047477;
662-
pub const TIOCSPGRP: ::c_ulong = 0x80047476;
663-
pub const TIOCOUTQ: ::c_ulong = 0x7472;
664-
pub const TIOCSTI: ::c_ulong = 0x5472;
665-
pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
666-
pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
667-
pub const TIOCMGET: ::c_ulong = 0x741d;
668-
pub const TIOCMBIS: ::c_ulong = 0x741b;
669-
pub const TIOCMBIC: ::c_ulong = 0x741c;
670-
pub const TIOCMSET: ::c_ulong = 0x741a;
671-
pub const FIONREAD: ::c_ulong = 0x467f;
672-
pub const TIOCCONS: ::c_ulong = 0x80047478;
642+
pub const TCGETS: ::c_int = 0x540d;
643+
pub const TCSETS: ::c_int = 0x540e;
644+
pub const TCSETSW: ::c_int = 0x540f;
645+
pub const TCSETSF: ::c_int = 0x5410;
646+
pub const TCGETA: ::c_int = 0x5401;
647+
pub const TCSETA: ::c_int = 0x5402;
648+
pub const TCSETAW: ::c_int = 0x5403;
649+
pub const TCSETAF: ::c_int = 0x5404;
650+
pub const TCSBRK: ::c_int = 0x5405;
651+
pub const TCXONC: ::c_int = 0x5406;
652+
pub const TCFLSH: ::c_int = 0x5407;
653+
pub const TIOCGSOFTCAR: ::c_int = 0x5481;
654+
pub const TIOCSSOFTCAR: ::c_int = 0x5482;
655+
pub const TIOCINQ: ::c_int = 0x467f;
656+
pub const TIOCLINUX: ::c_int = 0x5483;
657+
pub const TIOCGSERIAL: ::c_int = 0x5484;
658+
pub const TIOCEXCL: ::c_int = 0x740d;
659+
pub const TIOCNXCL: ::c_int = 0x740e;
660+
pub const TIOCSCTTY: ::c_int = 0x5480;
661+
pub const TIOCGPGRP: ::c_int = 0x40047477;
662+
pub const TIOCSPGRP: ::c_int = 0x80047476_u32 as i32;
663+
pub const TIOCOUTQ: ::c_int = 0x7472;
664+
pub const TIOCSTI: ::c_int = 0x5472;
665+
pub const TIOCGWINSZ: ::c_int = 0x40087468;
666+
pub const TIOCSWINSZ: ::c_int = 0x80087467_u32 as i32;
667+
pub const TIOCMGET: ::c_int = 0x741d;
668+
pub const TIOCMBIS: ::c_int = 0x741b;
669+
pub const TIOCMBIC: ::c_int = 0x741c;
670+
pub const TIOCMSET: ::c_int = 0x741a;
671+
pub const FIONREAD: ::c_int = 0x467f;
672+
pub const TIOCCONS: ::c_int = 0x80047478_u32 as i32;
673673

674674
pub const MCL_CURRENT: ::c_int = 0x0001;
675675
pub const MCL_FUTURE: ::c_int = 0x0002;

0 commit comments

Comments
 (0)