$NetBSD: patch-ar,v 1.2 2006/03/30 21:07:48 jmmv Exp $ --- libgnomevfs/gnome-vfs-pty.c.orig 2005-11-22 15:10:17.000000000 +0100 +++ libgnomevfs/gnome-vfs-pty.c @@ -629,6 +629,7 @@ _gnome_vfs_pty_set_size(int master, int static char * _gnome_vfs_pty_ptsname(int master) { +#ifndef __APPLE__ #if defined(HAVE_PTSNAME_R) gsize len = 1024; char *buf = NULL; @@ -674,6 +675,7 @@ _gnome_vfs_pty_ptsname(int master) return g_strdup_printf("/dev/pts/%d", pty); } #endif +#endif /* __APPLE__ */ return NULL; } @@ -681,10 +683,10 @@ static int _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. */ @@ -703,7 +705,7 @@ _gnome_vfs_pty_getpt(void) static int _gnome_vfs_pty_grantpt(int master) { -#ifdef HAVE_GRANTPT +#if defined(HAVE_GRANTPT) && !defined(__APPLE__) return grantpt(master); #else return 0; @@ -713,6 +715,9 @@ _gnome_vfs_pty_grantpt(int master) static int _gnome_vfs_pty_unlockpt(int fd) { +#ifdef __APPLE__ + return -1; +#else #ifdef HAVE_UNLOCKPT return unlockpt(fd); #elif defined(TIOCSPTLCK) @@ -721,6 +726,7 @@ _gnome_vfs_pty_unlockpt(int fd) #else return -1; #endif +#endif } static int