Skip to content

Commit

Permalink
Remove the long_array conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Nov 18, 2024
1 parent 53db662 commit a324fe1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
6 changes: 0 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
"freebsd14",
"freebsd15",
"libc_deny_warnings",
"libc_long_array",
"libc_thread_local",
"libc_ctest",
];
Expand Down Expand Up @@ -77,11 +76,6 @@ fn main() {
set_cfg("libc_deny_warnings");
}

// Rust >= 1.47 supports long array:
if rustc_minor_ver >= 47 || rustc_dep_of_std {
set_cfg("libc_long_array");
}

// #[thread_local] is currently unstable
if rustc_dep_of_std {
set_cfg("libc_thread_local");
Expand Down
8 changes: 0 additions & 8 deletions src/unix/bsd/apple/long_array.rs

This file was deleted.

9 changes: 9 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,12 @@ s! {
pub ifs6_out_mldreport: ::u_quad_t,
pub ifs6_out_mlddone: ::u_quad_t,
}

// kern_control.h
pub struct ctl_info {
pub ctl_id: u32,
pub ctl_name: [::c_char; MAX_KCTL_NAME],
}
}

s_no_extra_traits! {
Expand Down Expand Up @@ -5753,6 +5759,9 @@ pub const NETLINK_GENERIC: ::c_int = 0;
pub const DOT3COMPLIANCE_STATS: ::c_int = 1;
pub const DOT3COMPLIANCE_COLLS: ::c_int = 2;

// kern_control.h
pub const MAX_KCTL_NAME: usize = 96;

f! {
pub fn CMSG_NXTHDR(mhdr: *const ::msghdr,
cmsg: *const ::cmsghdr) -> *mut ::cmsghdr {
Expand Down

0 comments on commit a324fe1

Please sign in to comment.