Skip to content

Commit

Permalink
Auto merge of #2642 - tamird:mreqn-all-linux, r=Amanieu
Browse files Browse the repository at this point in the history
Define ip_mreqn on all Linux platforms

Updates #1558.
  • Loading branch information
bors committed Jan 24, 2022
2 parents 8bba79c + da84eef commit 4d03473
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 50 deletions.
5 changes: 5 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2967,6 +2967,11 @@ fn test_linux(target: &str) {
if (musl || sparc64) && ty.starts_with("uinput_") {
return true;
}
// FIXME(https://github.com/rust-lang/libc/issues/1558): passing by
// value corrupts the value for reasons not understood.
if (gnu && sparc64) && ty == "ip_mreqn" {
return true;
}
match ty {
// These cannot be tested when "resolv.h" is included and are tested
// in the `linux_elf.rs` file.
Expand Down
1 change: 0 additions & 1 deletion libc-test/semver/linux-aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ TIOCGRS485
TIOCSBRK
TIOCSRS485
flock64
ip_mreqn
max_align_t
mcontext_t
ucontext_t
Expand Down
1 change: 0 additions & 1 deletion libc-test/semver/linux-i686.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ fsblkcnt64_t
fsfilcnt64_t
getcontext
greg_t
ip_mreqn
makecontext
max_align_t
mcontext_t
Expand Down
1 change: 0 additions & 1 deletion libc-test/semver/linux-mips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,4 @@ SYS_vserver
SYS_waitpid
TIOCCBRK
TIOCSBRK
ip_mreqn
max_align_t
1 change: 0 additions & 1 deletion libc-test/semver/linux-powerpc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,4 @@ TIOCSRS485
flock64
fsblkcnt64_t
fsfilcnt64_t
ip_mreqn
sysctl
1 change: 0 additions & 1 deletion libc-test/semver/linux-powerpc64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,5 @@ TIOCGRS485
TIOCSBRK
TIOCSRS485
flock64
ip_mreqn
max_align_t
sysctl
1 change: 0 additions & 1 deletion libc-test/semver/linux-powerpc64le.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,5 @@ TIOCGRS485
TIOCSBRK
TIOCSRS485
flock64
ip_mreqn
max_align_t
sysctl
1 change: 0 additions & 1 deletion libc-test/semver/linux-riscv64gc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@ TIOCSRS485
flock64
fsblkcnt64_t
fsfilcnt64_t
ip_mreqn
1 change: 0 additions & 1 deletion libc-test/semver/linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ TIOCGRS485
TIOCSBRK
TIOCSRS485
greg_t
ip_mreqn
max_align_t
mcontext_t
ucontext_t
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2794,6 +2794,7 @@ input_event
input_id
input_keymap_entry
input_mask
ip_mreqn
ip_mreq_source
ipc_perm
itimerspec
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ s! {
pub cmsg_type: ::c_int,
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}

pub struct termios {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/gnu/b32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ s! {
pub _f: [::c_char; 8],
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}

pub struct semid_ds {
pub sem_perm: ipc_perm,
#[cfg(target_arch = "powerpc")]
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@ s! {
pub ss_size: ::size_t
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}

pub struct seccomp_notif_sizes {
pub seccomp_notif: ::__u16,
pub seccomp_notif_resp: ::__u16,
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,6 @@ s! {
pub ss_flags: ::c_int,
pub ss_size: ::size_t
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}
}

pub const POSIX_FADV_DONTNEED: ::c_int = 4;
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,6 @@ s! {
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}
}

pub const POSIX_FADV_DONTNEED: ::c_int = 4;
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,6 @@ s! {
__unused5: u64
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}

pub struct seccomp_notif_sizes {
pub seccomp_notif: ::__u16,
pub seccomp_notif_resp: ::__u16,
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,6 @@ s! {
pub rt_irtt: ::c_ushort,
}

pub struct ip_mreqn {
pub imr_multiaddr: ::in_addr,
pub imr_address: ::in_addr,
pub imr_ifindex: ::c_int,
}

pub struct __exit_status {
pub e_termination: ::c_short,
pub e_exit: ::c_short,
Expand Down
6 changes: 6 additions & 0 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ s! {
pub imr_interface: in_addr,
}

pub struct ip_mreqn {
pub imr_multiaddr: in_addr,
pub imr_address: in_addr,
pub imr_ifindex: ::c_int,
}

pub struct ip_mreq_source {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
Expand Down

0 comments on commit 4d03473

Please sign in to comment.