Skip to content

Commit

Permalink
uclibc: fix O_TMPFILE value, un-pub some unused fields to fix libc-test
Browse files Browse the repository at this point in the history
  • Loading branch information
skrap committed Jan 19, 2022
1 parent 6987bba commit 0fcf5b3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 31 deletions.
2 changes: 1 addition & 1 deletion ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

RUN mkdir /toolchain

RUN curl --retry 5 -L https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2020.08-1.tar.bz2 | \
RUN curl --retry 5 -L https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2021.11-1.tar.bz2 | \
tar xjf - -C /toolchain --strip-components=1
RUN /toolchain/relocate-sdk.sh

Expand Down
10 changes: 0 additions & 10 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3167,10 +3167,6 @@ fn test_linux(target: &str) {
"NETLINK_GET_STRICT_CHK" if arm || mips || musl => true,

// kernel constants not available in uclibc 1.0.34
| "ADDR_COMPAT_LAYOUT"
| "ADDR_LIMIT_3GB"
| "ADDR_NO_RANDOMIZE"
| "CLONE_NEWCGROUP"
| "EXTPROC"
| "FAN_MARK_FILESYSTEM"
| "FAN_MARK_INODE"
Expand All @@ -3181,13 +3177,7 @@ fn test_linux(target: &str) {
| "IPV6_PMTUDISC_INTERFACE"
| "IPV6_PMTUDISC_OMIT"
| "IPV6_ROUTER_ALERT_ISOLATE"
| "O_TMPFILE"
| "PACKET_MR_UNICAST"
| "PTRACE_EVENT_STOP"
| "PTRACE_O_EXITKILL"
| "PTRACE_O_SUSPEND_SECCOMP"
| "PTRACE_PEEKSIGINFO"
| "READ_IMPLIES_EXEC"
| "RUSAGE_THREAD"
| "SHM_EXEC"
| "UDP_GRO"
Expand Down
38 changes: 19 additions & 19 deletions src/unix/linux_like/linux/uclibc/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ s! {

pub struct stat {
pub st_dev: ::c_ulonglong,
pub __pad1: ::c_ushort,
__pad1: ::c_ushort,
pub st_ino: ::ino_t,
pub st_mode: ::mode_t,
pub st_nlink: ::nlink_t,
pub st_uid: ::uid_t,
pub st_gid: ::gid_t,
pub st_rdev: ::c_ulonglong,
pub __pad2: ::c_ushort,
__pad2: ::c_ushort,
pub st_size: ::off_t,
pub st_blksize: ::blksize_t,
pub st_blocks: ::blkcnt_t,
Expand All @@ -61,8 +61,8 @@ s! {
pub st_mtime_nsec: ::c_long,
pub st_ctime: ::time_t,
pub st_ctime_nsec: ::c_long,
pub __unused4: ::c_ulong,
pub __unused5: ::c_ulong,
__unused4: ::c_ulong,
__unused5: ::c_ulong,
}

pub struct stat64
Expand Down Expand Up @@ -202,44 +202,44 @@ s! {
pub cuid: ::uid_t,
pub cgid: ::gid_t,
pub mode: ::c_ushort,
pub __pad1: ::c_ushort,
__pad1: ::c_ushort,
pub __seq: ::c_ushort,
pub __pad2: ::c_ushort,
pub __unused1: ::c_ulong,
pub __unused2: ::c_ulong,
__pad2: ::c_ushort,
__unused1: ::c_ulong,
__unused2: ::c_ulong,
}

pub struct msqid_ds {
pub msg_perm: ::ipc_perm,
pub msg_stime: ::time_t,
pub __unused1: ::c_ulong,
__unused1: ::c_ulong,
pub msg_rtime: ::time_t,
pub __unused2: ::c_ulong,
__unused2: ::c_ulong,
pub msg_ctime: ::time_t,
pub __unused3: ::c_ulong,
pub __msg_cbytes: ::c_ulong,
__unused3: ::c_ulong,
__msg_cbytes: ::c_ulong,
pub msg_qnum: ::msgqnum_t,
pub msg_qbytes: ::msglen_t,
pub msg_lspid: ::pid_t,
pub msg_lrpid: ::pid_t,
pub __unused4: ::c_ulong,
pub __unused5: ::c_ulong,
__unused4: ::c_ulong,
__unused5: ::c_ulong,
}

pub struct shmid_ds {
pub shm_perm: ::ipc_perm,
pub shm_segsz: ::size_t,
pub shm_atime: ::time_t,
pub __unused1: ::c_ulong,
__unused1: ::c_ulong,
pub shm_dtime: ::time_t,
pub __unused2: ::c_ulong,
__unused2: ::c_ulong,
pub shm_ctime: ::time_t,
pub __unused3: ::c_ulong,
__unused3: ::c_ulong,
pub shm_cpid: ::pid_t,
pub shm_lpid: ::pid_t,
pub shm_nattch: ::shmatt_t,
pub __unused4: ::c_ulong,
pub __unused5: ::c_ulong,
__unused4: ::c_ulong,
__unused5: ::c_ulong,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT;
pub const MINSIGSTKSZ: ::c_int = 2048;
pub const MSG_COPY: ::c_int = 040000;
pub const NI_MAXHOST: ::socklen_t = 1025;
pub const O_TMPFILE: ::c_int = 020000000 | O_DIRECTORY;
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
pub const PACKET_MR_UNICAST: ::c_int = 3;
pub const PF_NFC: ::c_int = 39;
pub const PF_VSOCK: ::c_int = 40;
Expand Down

0 comments on commit 0fcf5b3

Please sign in to comment.