(0015264)
bernhardf
11-07-08 16:05
|
I'll think about removing the fallback from posix_openpt some more..
Other than that, i'd suggest:
Index: libc/stdlib/getpt.c
===================================================================
--- libc/stdlib/getpt.c (revision 23964)
+++ libc/stdlib/getpt.c (working copy)
@@ -108,6 +108,11 @@ posix_openpt (int flags)
return -1;
}
}
+#if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
+ /* If we have no ptmx then ignore flags and use the fallback. */
+ if (_state & have_no_dev_ptmx)
+ return __bsd_getpt();
+#endif
return -1;
}
libc_hidden_def(posix_openpt)
@@ -126,7 +131,7 @@ getpt (void)
return fd;
}
-#if !defined __UNIX98PTY_ONLY__
+#if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
# define PTYNAME1 "pqrstuvwxyzabcde";
# define PTYNAME2 "0123456789abcdef";
Thanks for the heads-up! |