projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ptsname_r: support ptys returned by FreeBSD posix_openpt
[gnulib.git]
/
lib
/
ptsname_r.c
diff --git
a/lib/ptsname_r.c
b/lib/ptsname_r.c
index
140a75b
..
145d5b1
100644
(file)
--- a/
lib/ptsname_r.c
+++ b/
lib/ptsname_r.c
@@
-177,7
+177,8
@@
__ptsname_r (int fd, char *buf, size_t buflen)
return errno;
}
- buf[sizeof (_PATH_DEV) - 1] = 't';
+ if (strncmp(buf, "/dev/pts/", strlen("/dev/pts/")) != 0)
+ buf[sizeof (_PATH_DEV) - 1] = 't';
#endif
if (__stat (buf, &st) < 0)