$NetBSD: patch-ar,v 1.2 2018/02/16 13:18:26 wiz Exp $ --- libgnomevfs/gnome-vfs-pty.c.orig 2010-02-09 12:16:14.000000000 +0000 +++ libgnomevfs/gnome-vfs-pty.c @@ -330,7 +330,7 @@ _gnome_vfs_pty_run_on_pty(int fd, gboole chdir(directory); } -#ifdef HAVE_UTMP_H +#ifdef HAVE_LOGIN_TTY /* This sets stdin, stdout, stderr to the socket */ if (login && login_tty (fd) == -1) { g_printerr ("mount child process login_tty failed: %s\n", strerror (errno)); @@ -654,6 +654,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; @@ -699,6 +700,7 @@ _gnome_vfs_pty_ptsname(int master) return g_strdup_printf("/dev/pts/%d", pty); } #endif +#endif /* __APPLE__ */ return NULL; } @@ -706,10 +708,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. */ @@ -728,7 +730,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; @@ -738,6 +740,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) @@ -746,6 +751,7 @@ _gnome_vfs_pty_unlockpt(int fd) #else return -1; #endif +#endif } static int