Skip to content

Commit 756a285

Browse files
committedNov 18, 2024
Remove the long_array conditional
1 parent 6b61531 commit 756a285

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed
 

‎build.rs

-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1515
"freebsd14",
1616
"freebsd15",
1717
"libc_deny_warnings",
18-
"libc_long_array",
1918
"libc_thread_local",
2019
"libc_ctest",
2120
];
@@ -77,11 +76,6 @@ fn main() {
7776
set_cfg("libc_deny_warnings");
7877
}
7978

80-
// Rust >= 1.47 supports long array:
81-
if rustc_minor_ver >= 47 || rustc_dep_of_std {
82-
set_cfg("libc_long_array");
83-
}
84-
8579
// #[thread_local] is currently unstable
8680
if rustc_dep_of_std {
8781
set_cfg("libc_thread_local");

‎src/unix/bsd/apple/long_array.rs

-8
This file was deleted.

‎src/unix/bsd/apple/mod.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,12 @@ s! {
13071307
pub iffmid_id: u32,
13081308
pub iffmid_str: [::c_char; 1],
13091309
}
1310+
1311+
// kern_control.h
1312+
pub struct ctl_info {
1313+
pub ctl_id: u32,
1314+
pub ctl_name: [::c_char; MAX_KCTL_NAME],
1315+
}
13101316
}
13111317

13121318
s_no_extra_traits! {
@@ -5753,6 +5759,9 @@ pub const NETLINK_GENERIC: ::c_int = 0;
57535759
pub const DOT3COMPLIANCE_STATS: ::c_int = 1;
57545760
pub const DOT3COMPLIANCE_COLLS: ::c_int = 2;
57555761

5762+
// kern_control.h
5763+
pub const MAX_KCTL_NAME: usize = 96;
5764+
57565765
f! {
57575766
pub fn CMSG_NXTHDR(mhdr: *const ::msghdr,
57585767
cmsg: *const ::cmsghdr) -> *mut ::cmsghdr {
@@ -6825,10 +6834,3 @@ cfg_if! {
68256834
// Unknown target_arch
68266835
}
68276836
}
6828-
6829-
cfg_if! {
6830-
if #[cfg(libc_long_array)] {
6831-
mod long_array;
6832-
pub use self::long_array::*;
6833-
}
6834-
}

0 commit comments

Comments
 (0)