From 4a0151f6cbac87471565484293d200fe010d3d02 Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 25 Dec 2025 20:21:08 -0300 Subject: [PATCH] mlibc: implement sys_unlockpt --- patches/mlibc/jinx-working-patch.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/patches/mlibc/jinx-working-patch.patch b/patches/mlibc/jinx-working-patch.patch index 1f311710..355a8676 100644 --- a/patches/mlibc/jinx-working-patch.patch +++ b/patches/mlibc/jinx-working-patch.patch @@ -68,3 +68,20 @@ index 1ed110d..ded9114 100644 - } +void backtrace_symbols_fd(void *const *, int, int) { } +diff --git mlibc-clean/sysdeps/astral/generic/generic.cpp mlibc-workdir/sysdeps/astral/generic/generic.cpp +index 939925e..5ee7fad 100644 +--- mlibc-clean/sysdeps/astral/generic/generic.cpp ++++ mlibc-workdir/sysdeps/astral/generic/generic.cpp +@@ -47,6 +47,12 @@ namespace mlibc { + return 0; + } + ++ int sys_unlockpt(int fd) { ++ int r; ++ // unlockpt is a no-op kernel side, so use this to check for an invalid pty ++ return sys_ioctl(fd, 0x13376167, NULL, &r); ++ } ++ + int sys_readv(int fd, const struct iovec *iovs, int iovc, ssize_t *bytes_read) { + long r; + int error = syscall(SYSCALL_READV, &r, fd, (uint64_t)iovs, iovc);