Use the real glibc openpty if present.
diff --git a/misc/port.c b/misc/port.c
index c03819b..d75d38b 100644
--- a/misc/port.c
+++ b/misc/port.c
@@ -29,6 +29,9 @@
#ifdef HAVE_SYSCALL_H
# include <syscall.h>
#endif
+#ifdef HAVE_PTY_H
+# include <pty.h>
+#endif
/***********************************************************************
* usleep
@@ -166,6 +169,9 @@
int wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize)
{
+#ifdef HAVE_OPENPTY
+ return openpty(master,slave,name,term,winsize);
+#else
char *ptr1, *ptr2;
char pts_name[512];
@@ -198,6 +204,7 @@
}
}
return -1;
+#endif
}
/***********************************************************************