summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/unix_grantpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/unix_grantpt.c')
-rw-r--r--libc/stdlib/unix_grantpt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index e087d18c8..0e7d50a99 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -23,6 +23,9 @@
#define setrlimit __setrlimit
#define waitpid __waitpid
#define dup2 __dup2
+#define chmod __chmod
+#define vfork __vfork
+#define fork __fork
#include <assert.h>
#include <errno.h>
@@ -41,7 +44,7 @@
/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
#include <sys/syscall.h>
#if ! defined __NR_vfork
-#define vfork fork
+#define vfork fork
#endif
extern int __ptsname_r (int fd, char *buf, size_t buflen) attribute_hidden;
@@ -119,7 +122,7 @@ grantpt (int fd)
if (pts_name (fd, &buf, sizeof (_buf)))
return -1;
- if (stat(buf, &st) < 0)
+ if (__stat(buf, &st) < 0)
goto cleanup;
/* Make sure that we own the device. */
@@ -165,10 +168,10 @@ grantpt (int fd)
/* We pase the master pseudo terminal as file descriptor PTY_FILENO. */
if (fd != PTY_FILENO)
if (dup2 (fd, PTY_FILENO) < 0)
- _exit (FAIL_EBADF);
+ _exit_internal (FAIL_EBADF);
execle (_PATH_PT_CHOWN, _PATH_PT_CHOWN, NULL, NULL);
- _exit (FAIL_EXEC);
+ _exit_internal (FAIL_EXEC);
}
else
{