From 1052c769ce30feb046477a4ebd63ee8ad0f901dc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 31 Aug 2026 08:52:15 +0200 Subject: [PATCH] ptsname_r: Enable on GNU/Hurd --- changelog/2820.added.md | 1 + src/pty.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/2820.added.md diff --git a/changelog/2820.added.md b/changelog/2820.added.md new file mode 100644 index 0000000000..6157405930 --- /dev/null +++ b/changelog/2820.added.md @@ -0,0 +1 @@ +Add `ptsname_r` for GNU/Hurd diff --git a/src/pty.rs b/src/pty.rs index ab449e4ab7..b459400283 100644 --- a/src/pty.rs +++ b/src/pty.rs @@ -212,7 +212,7 @@ pub unsafe fn ptsname(fd: &PtyMaster) -> Result { /// /// This value is useful for opening the slave ptty once the master has already been opened with /// `posix_openpt()`. -#[cfg(linux_android)] +#[cfg(any(linux_android, target_os = "hurd"))] #[inline] pub fn ptsname_r(fd: &PtyMaster) -> Result { let mut name_buf = Vec::::with_capacity(64);