$OpenBSD: patch-src_pty_c,v 1.5 2012/12/13 19:37:50 ajacoutot Exp $
--- src/pty.c.orig	Thu Dec 13 20:33:04 2012
+++ src/pty.c	Thu Dec 13 20:33:27 2012
@@ -841,11 +841,7 @@ _vte_pty_getpt(GError **error)
 	/* Call the system's function for allocating a pty. */
 	fd = getpt();
 #else
-	/* Try to allocate a pty by accessing the pty master multiplex. */
-	fd = open("/dev/ptmx", O_RDWR | O_NOCTTY);
-	if ((fd == -1) && (errno == ENOENT)) {
-		fd = open("/dev/ptc", O_RDWR | O_NOCTTY); /* AIX */
-	}
+	fd = posix_openpt(O_RDWR | O_NOCTTY);
 #endif
         if (fd == -1) {
                 g_set_error (error, VTE_PTY_ERROR,
