blob: 58c151c97fbbcd926b1781746aff0c5ce7216d7a [file] [log] [blame] [edit]
#include <stdlib.h>
#include <errno.h>
char *ptsname(int fd)
{
static char buf[9 + sizeof(int)*3 + 1];
int err = __ptsname_r(fd, buf, sizeof buf);
if (err) {
errno = err;
return 0;
}
return buf;
}