8 int posix_openpt(int flags)
10 return open("/dev/ptmx", flags);
21 return ioctl(fd, TIOCSPTLCK, &unlock);
24 int __ptsname_r(int fd, char *buf, size_t len)
28 if ((err = __syscall(SYS_ioctl, fd, TIOCGPTN, &pty))) return -err;
29 if (snprintf(buf, len, "/dev/pts/%d", pty) >= len) return ERANGE;
33 weak_alias(__ptsname_r, ptsname_r);