Skip to content

Commit

Permalink
Auto merge of #2766 - devnexen:kinfo_fbsd_update2, r=<try>
Browse files Browse the repository at this point in the history
freebsd kinfo_kstat/sigtramp additions
  • Loading branch information
bors committed Sep 12, 2022
2 parents c20064f + 4b61ce8 commit 0297a34
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ fn main() {
println!("cargo:rustc-cfg=libc_underscore_const_names");
}

// Rust >= 1.47.0 allows traits with array > 32.
if rustc_minor_ver >= 47 || rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_large_array");
}

// #[thread_local] is currently unstable
if rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_thread_local");
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,9 @@ kevent
key_t
killpg
kinfo_getvmmap
kinfo_kstack
kinfo_proc
kinfo_sigtramp
kinfo_vmentry
kqueue
kld_isloaded
Expand Down
14 changes: 14 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,20 @@ s! {
pub kve_path: [[::c_char; 32]; 32],
}

#[cfg(libc_large_array)]
pub struct kinfo_kstack {
pub kkst_tid: ::lwpid_t,
pub kkst_state: ::c_int,
pub kkst_trace: [::c_char; KKST_MAXLEN as usize],
pub _kkst_ispare: [::c_int; 16],
}

pub struct kinfo_sigtramp {
pub ksigtramp_start: *mut ::c_void,
pub ksigtramp_end: *mut ::c_void,
pub ksigtramp_spare: [*mut ::c_void; 4],
}

pub struct __c_anonymous_filestat {
pub stqe_next: *mut filestat,
}
Expand Down

0 comments on commit 0297a34

Please sign in to comment.