Browse Source

michael_d writes in 1879:
When no TIOCGPTN definition is present in the kernel headers, the library's ptsname() function will not work.

The libc/stdlib/ptsname_r.c file is the problem. This file includes a complicated nest of #if directives. One of these #if's has the opposite sense from what is required.

Mike Frysinger 17 years ago
parent
commit
5ec141e002
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/stdlib/ptsname.c

+ 1 - 1
libc/stdlib/ptsname.c

@@ -129,7 +129,7 @@ int ptsname_r (int fd, char *buf, size_t buflen)
       return ENOTTY;
     }
 #else
-# if !defined TIOCGPTN
+# if defined TIOCGPTN
   else if (errno == EINVAL)
 # endif
     {