Index: rust-tokio-1.39.3/src/net/unix/mod.rs
===================================================================
--- rust-tokio-1.39.3.orig/src/net/unix/mod.rs
+++ rust-tokio-1.39.3/src/net/unix/mod.rs
@@ -21,7 +21,9 @@ pub use socketaddr::SocketAddr;
 pub(crate) mod stream;
 pub(crate) use stream::UnixStream;
 
+#[cfg(not(target_os = "hurd"))]
 mod ucred;
+#[cfg(not(target_os = "hurd"))]
 pub use ucred::UCred;
 
 pub mod pipe;
Index: rust-tokio-1.39.3/src/net/unix/stream.rs
===================================================================
--- rust-tokio-1.39.3.orig/src/net/unix/stream.rs
+++ rust-tokio-1.39.3/src/net/unix/stream.rs
@@ -2,6 +2,7 @@ use crate::future::poll_fn;
 use crate::io::{AsyncRead, AsyncWrite, Interest, PollEvented, ReadBuf, Ready};
 use crate::net::unix::split::{split, ReadHalf, WriteHalf};
 use crate::net::unix::split_owned::{split_owned, OwnedReadHalf, OwnedWriteHalf};
+#[cfg(not(target_os = "hurd"))]
 use crate::net::unix::ucred::{self, UCred};
 use crate::net::unix::SocketAddr;
 
@@ -928,6 +929,7 @@ impl UnixStream {
     }
 
     /// Returns effective credentials of the process which called `connect` or `pair`.
+    #[cfg(not(target_os = "hurd"))]
     pub fn peer_cred(&self) -> io::Result<UCred> {
         ucred::get_peer_cred(self)
     }
Index: rust-tokio-1.39.3/tests/uds_cred.rs
===================================================================
--- rust-tokio-1.39.3.orig/tests/uds_cred.rs
+++ rust-tokio-1.39.3/tests/uds_cred.rs
@@ -12,6 +12,10 @@ use libc::geteuid;
     target_os = "netbsd",
     ignore = "NetBSD does not support getpeereid() for sockets created by socketpair()"
 )]
+#[cfg_attr(
+    target_os = "hurd",
+    ignore = "GNU/Hurd doesn't have support for peercred yet"
+)]
 async fn test_socket_pair() {
     let (a, b) = UnixStream::pair().unwrap();
     let cred_a = a.peer_cred().unwrap();
