Rollup merge of #112352 - dankm:fbsd_doc_fix, r=thomcc

Fix documentation build on FreeBSD

After the socket ancillary data implementation was introduced, the documentation build was broken on FreeBSD hosts, add the same workaround as for the existing implementations.

Fixes the doc build after #91793
This commit is contained in:
Matthias Krüger 2023-06-17 12:43:29 +02:00 committed by GitHub
commit d2120b7d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,13 @@ use crate::slice::from_raw_parts;
use crate::sys::net::Socket;
// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
#[cfg(all(doc, not(target_os = "linux"), not(target_os = "android"), not(target_os = "netbsd")))]
#[cfg(all(
doc,
not(target_os = "linux"),
not(target_os = "android"),
not(target_os = "netbsd"),
not(target_os = "freebsd")
))]
#[allow(non_camel_case_types)]
mod libc {
pub use libc::c_int;