$NetBSD: patch-ar,v 1.1 2004/10/24 18:03:24 recht Exp $ --- modules/pty-open.c.orig Sun Oct 24 19:06:16 2004 +++ modules/pty-open.c Sun Oct 24 19:17:26 2004 @@ -554,6 +554,7 @@ static char * _gnome_vfs_pty_ptsname(int master) { +#ifndef __APPLE__ #if defined(HAVE_PTSNAME_R) gsize len = 1024; char *buf = NULL; @@ -599,6 +600,7 @@ return g_strdup_printf("/dev/pts/%d", pty); } #endif +#endif /* __APPLE__ */ return NULL; } @@ -606,10 +608,10 @@ _gnome_vfs_pty_getpt(void) { int fd, flags; -#ifdef HAVE_GETPT +#if defined(HAVE_GETPT) && !defined(__APPLE__) /* Call the system's function for allocating a pty. */ fd = getpt(); -#elif defined(HAVE_POSIX_OPENPT) +#elif defined(HAVE_POSIX_OPENPT) && !defined(__APPLE__) fd = posix_openpt(O_RDWR | O_NOCTTY); #else /* Try to allocate a pty by accessing the pty master multiplex. */ @@ -628,7 +630,7 @@ static int _gnome_vfs_pty_grantpt(int master) { -#ifdef HAVE_GRANTPT +#if defined(HAVE_GRANTPT) && !defined(__APPLE__) return grantpt(master); #else return 0; @@ -638,6 +640,9 @@ static int _gnome_vfs_pty_unlockpt(int fd) { +#ifdef __APPLE__ + return -1; +#else #ifdef HAVE_UNLOCKPT return unlockpt(fd); #elif defined(TIOCSPTLCK) @@ -645,6 +650,7 @@ return ioctl(fd, TIOCSPTLCK, &zero); #else return -1; +#endif #endif }