about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLinkTed <LinkTed@users.noreply.github.com>2020-10-17 19:36:11 +0200
committerLinkTed <LinkTed@users.noreply.github.com>2020-10-17 19:36:11 +0200
commit79273fa30c62f2277688ed19649a0b45b902c8a1 (patch)
tree03a6c34bfc513d2a77268396e1f59c79938102ea
parentd8c75d9f91fe737bc3ef3ac7592f055bf846270e (diff)
downloadrust-79273fa30c62f2277688ed19649a0b45b902c8a1.tar.gz
rust-79273fa30c62f2277688ed19649a0b45b902c8a1.zip
Fix cannot find type `ucred` for MacOs by using fake definitions
-rw-r--r--library/std/src/sys/unix/ext/net/ancillary.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/ext/net/ancillary.rs b/library/std/src/sys/unix/ext/net/ancillary.rs
index 9442d340a32..a68475ab985 100644
--- a/library/std/src/sys/unix/ext/net/ancillary.rs
+++ b/library/std/src/sys/unix/ext/net/ancillary.rs
@@ -10,7 +10,7 @@ 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(not(unix))]
+#[cfg(all(doc, not(target_os = "linux"), not(target_os = "android")))]
 #[allow(non_camel_case_types)]
 mod libc {
     pub use libc::c_int;