diff options
| author | kennytm <kennytm@gmail.com> | 2017-08-11 09:01:46 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2017-08-12 12:07:39 +0800 |
| commit | 3093bb85f94e6f3c4707674c8b70c28ecfbf3bf9 (patch) | |
| tree | ed40a3113cb2b64fd0796802af64c8ef661b6b6d /src/libstd/sys/unix | |
| parent | b4114ebe3a19d7d9bdacf700cc67bd2709eafe5b (diff) | |
| download | rust-3093bb85f94e6f3c4707674c8b70c28ecfbf3bf9.tar.gz rust-3093bb85f94e6f3c4707674c8b70c28ecfbf3bf9.zip | |
Fix error during cross-platform documentation.
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/ext/net.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index 94b87a6bff4..1644ded5e5c 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -12,8 +12,19 @@ //! Unix-specific networking functionality +#[cfg(unix)] use libc; +// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here? +#[cfg(not(unix))] +mod libc { + pub use libc::c_int; + pub type socklen_t = u32; + pub struct sockaddr; + #[derive(Clone)] + pub struct sockaddr_un; +} + use ascii; use ffi::OsStr; use fmt; |
