OSDN Git Service

michael_d writes in 1879:
authorMike Frysinger <vapier@gentoo.org>
Sat, 5 Jan 2008 06:07:49 +0000 (06:07 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 5 Jan 2008 06:07:49 +0000 (06:07 -0000)
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.

libc/stdlib/ptsname.c

index dfb0d19..cff7432 100644 (file)
@@ -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
     {