# adapted from http://svnweb.freebsd.org/ports/head/x11-toolkits/vte/
--- config.h.in.orig Wed May 17 10:45:57 2006
+++ config.h.in Wed May 17 10:46:25 2006
/* Define to 1 if you have the <GL/glx.h> header file. */
+/* Define to 1 if you have the `posix_openpt' function. */
+#undef HAVE_POSIX_OPENPT
/* Define to 1 if you have the `grantpt' function. */
--- configure.orig 2010-03-30 14:43:41.000000000 +0200
+++ configure 2010-03-30 14:47:26.000000000 +0200
# Check for PTY handling functions.
-for ac_func in cfmakeraw fork setsid setpgid getpgid getpt grantpt unlockpt ptsname ptsname_r tcgetattr tcsetattr
+for ac_func in cfmakeraw fork setsid setpgid getpgid getpt grantpt posix_openpt unlockpt ptsname ptsname_r tcgetattr tcsetattr
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
--- src/pty.c.orig 2012-07-20 13:47:16.000000000 +0200
+++ src/pty.c 2012-07-20 14:07:30.000000000 +0200
_vte_pty_getpt(GError **error)
+#ifdef HAVE_POSIX_OPENPT
+ /* Call the system's function for allocating a pty. */
+ fd = posix_openpt(O_RDWR | O_NOCTTY);
+#elif defined(HAVE_GETPT)
/* Call the system's function for allocating a pty. */
+#if defined(__APPLE__) && defined(__MACH__)
+ /* fcntl(F_SETFL) failed */
rv = fcntl(fd, F_GETFL, 0);