git: d3462f66cf68 - main - lang/rust: Fix docs building.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 10:29:19 UTC
The branch main has been updated by mikael: URL: https://cgit.FreeBSD.org/ports/commit/?id=d3462f66cf68dcd26bfcb95d6b54a01e5ff466a8 commit d3462f66cf68dcd26bfcb95d6b54a01e5ff466a8 Author: Mikael Urankar <mikael@FreeBSD.org> AuthorDate: 2023-06-20 10:26:45 +0000 Commit: Mikael Urankar <mikael@FreeBSD.org> CommitDate: 2023-06-20 10:29:13 +0000 lang/rust: Fix docs building. Add the missing "pub struct sockcred2" in module "libc". Error: error[E0412]: cannot find type `sockcred2` in module `libc` --> library/std/src/os/unix/net/ancillary.rs:211:29 | 211 | pub struct SocketCred(libc::sockcred2); | ^^^^^^^^^ not found in `libc` Reported by: kib Differential Revision: https://reviews.freebsd.org/D40509 --- .../patch-library_std_src_os_unix_net_ancillary.rs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lang/rust/files/patch-library_std_src_os_unix_net_ancillary.rs b/lang/rust/files/patch-library_std_src_os_unix_net_ancillary.rs new file mode 100644 index 000000000000..d42b6b9405de --- /dev/null +++ b/lang/rust/files/patch-library_std_src_os_unix_net_ancillary.rs @@ -0,0 +1,27 @@ +From 513f28db0a540725bc41f080a0f52973af67c3db Mon Sep 17 00:00:00 2001 +From: MikaelUrankar <mikael.urankar@gmail.com> +Date: Tue, 13 Jun 2023 13:14:06 +0200 +Subject: [PATCH] Fix building the documentation on FreeBSD. + +It fixes the following error: +error[E0412]: cannot find type `sockcred2` in module `libc` + --> library/std/src/os/unix/net/ancillary.rs:211:29 + | +211 | pub struct SocketCred(libc::sockcred2); + | ^^^^^^^^^ not found in `libc` +--- + library/std/src/os/unix/net/ancillary.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/library/std/src/os/unix/net/ancillary.rs b/library/std/src/os/unix/net/ancillary.rs +index 7565fbc0d099c..814f1c7c2838e 100644 +--- library/std/src/os/unix/net/ancillary.rs ++++ library/std/src/os/unix/net/ancillary.rs +@@ -17,6 +17,7 @@ mod libc { + pub use libc::c_int; + pub struct ucred; + pub struct cmsghdr; ++ pub struct sockcred2; + pub type pid_t = i32; + pub type gid_t = u32; + pub type uid_t = u32;