powerpc-sf longjmp clobbering of val argument
[musl.git] / src / misc / ptsname.c
blob58c151c97fbbcd926b1781746aff0c5ce7216d7a
1 #include <stdlib.h>
2 #include <errno.h>
4 char *ptsname(int fd)
6 static char buf[9 + sizeof(int)*3 + 1];
7 int err = __ptsname_r(fd, buf, sizeof buf);
8 if (err) {
9 errno = err;
10 return 0;
12 return buf;