diff options
| author | LinkTed <LinkTed@users.noreply.github.com> | 2020-10-04 15:22:44 +0200 |
|---|---|---|
| committer | LinkTed <LinkTed@users.noreply.github.com> | 2020-10-10 15:19:13 +0200 |
| commit | a81764731cade72b551b213941ac2cd16a980788 (patch) | |
| tree | 4c3590af583a1dd90afdede256929b96ca96c375 /library/std/src | |
| parent | d0069a0cc525084770a035f5f6963f43ccdea26e (diff) | |
| download | rust-a81764731cade72b551b213941ac2cd16a980788.tar.gz rust-a81764731cade72b551b213941ac2cd16a980788.zip | |
Add fake definitions for Windows
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/unix/ext/net/ancillary.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/ext/net/ancillary.rs b/library/std/src/sys/unix/ext/net/ancillary.rs index 9e8da6306ca..e36ad8b956a 100644 --- a/library/std/src/sys/unix/ext/net/ancillary.rs +++ b/library/std/src/sys/unix/ext/net/ancillary.rs @@ -11,6 +11,16 @@ use crate::sys::net::Socket; #[cfg(any(target_os = "android", target_os = "linux",))] use libc::{gid_t, pid_t, uid_t}; +// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here? +#[cfg(not(unix))] +#[allow(non_camel_case_types)] +mod libc { + pub struct ucred; + pub struct cmsghdr; + pub type pid_t = i32; + pub type gid_t = u32; + pub type uid_t = u32; +} pub(super) fn recv_vectored_with_ancillary_from( socket: &Socket, |
