9 int posix_openpt(int flags)
11 return open("/dev/ptmx", flags);
22 return ioctl(fd, TIOCSPTLCK, &unlock);
25 int __ptsname_r(int fd, char *buf, size_t len)
29 if ((err = __syscall(SYS_ioctl, fd, TIOCGPTN, &pty))) return err;
30 if (snprintf(buf, len, "/dev/pts/%d", pty) >= len) return ERANGE;
34 weak_alias(__ptsname_r, ptsname_r);