ptsname: Avoid ERANGE failure on some systems.
authorBruno Haible <bruno@clisp.org>
Sat, 25 Dec 2010 16:58:02 +0000 (17:58 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 25 Dec 2010 16:58:02 +0000 (17:58 +0100)
* lib/ptsname.c (buffer): Increase size.

ChangeLog
lib/ptsname.c

index 84c1e7ca1f38a33b1667e17104a6a33a79a7c864..adc21adaafbb70297ea20a59e387067660d4d439 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-25  Bruno Haible  <bruno@clisp.org>
+
+       ptsname: Avoid ERANGE failure on some systems.
+       * lib/ptsname.c (buffer): Increase size.
+
 2010-12-25  Bruno Haible  <bruno@clisp.org>
 
        rename, renameat: Avoid test failures at NFS mounted locations.
index 3c7a9e043b876970eacfbdad4052cc8a302c7865..c2bea0164fabb98981d26f881580839500938310 100644 (file)
@@ -43,7 +43,7 @@ static int __ptsname_r (int fd, char *buf, size_t buflen);
 
 
 /* Static buffer for `ptsname'.  */
-static char buffer[sizeof (_PATH_TTY) + 2];
+static char buffer[64];
 
 
 /* Return the pathname of the pseudo terminal slave associated with