소스 검색

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 18 년 전
부모
커밋
5ec141e002
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
       return ENOTTY;
     }
     }
 #else
 #else
-# if !defined TIOCGPTN
+# if defined TIOCGPTN
   else if (errno == EINVAL)
   else if (errno == EINVAL)
 # endif
 # endif
     {
     {