aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/gftp
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2004-11-16 01:21:52 +0800
committeroliver <oliver@FreeBSD.org>2004-11-16 01:21:52 +0800
commit642ef56ae8fac5dbf7d4502b937db4c3e8c3d4f9 (patch)
tree0870f2c0de95c5eec72c76c2a2862da9806fd577 /ftp/gftp
parenta189823abb0b21a3823a756747b5954d029245b8 (diff)
downloadfreebsd-ports-gnome-642ef56ae8fac5dbf7d4502b937db4c3e8c3d4f9.tar.gz
freebsd-ports-gnome-642ef56ae8fac5dbf7d4502b937db4c3e8c3d4f9.tar.zst
freebsd-ports-gnome-642ef56ae8fac5dbf7d4502b937db4c3e8c3d4f9.zip
fix build on 5
Noted By: kris, Christian Hiris <4711@chello.at> PR: ports/73954
Diffstat (limited to 'ftp/gftp')
-rw-r--r--ftp/gftp/Makefile2
-rw-r--r--ftp/gftp/files/patch-lib::pty.c113
2 files changed, 114 insertions, 1 deletions
diff --git a/ftp/gftp/Makefile b/ftp/gftp/Makefile
index f98b86d11bbc..66d1e74080e9 100644
--- a/ftp/gftp/Makefile
+++ b/ftp/gftp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gftp
PORTVERSION= 2.0.18.r1
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= http://gftp.seul.org/ \
ftp://gftp.seul.org/pub/gftp/
diff --git a/ftp/gftp/files/patch-lib::pty.c b/ftp/gftp/files/patch-lib::pty.c
new file mode 100644
index 000000000000..f7c16d130878
--- /dev/null
+++ b/ftp/gftp/files/patch-lib::pty.c
@@ -0,0 +1,113 @@
+--- lib/pty.c.orig Mon Nov 15 18:09:32 2004
++++ lib/pty.c Mon Nov 15 18:18:21 2004
+@@ -59,6 +59,49 @@
+ return (new_fds);
+ }
+
++#elif HAVE_OPENPTY
++
++#ifdef HAVE_PTY_H
++#include <pty.h>
++#include <utmp.h> /* for login_tty */
++#elif HAVE_LIBUTIL_H
++#include <libutil.h>
++#include <utmp.h> /* for login_tty */
++#else
++extern int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize * winp);
++extern int login_tty(int fd);
++#endif
++
++char *
++gftp_get_pty_impl (void)
++{
++ return ("openpty");
++}
++
++
++static int
++_gftp_ptym_open (char *pts_name, size_t len, int *fds)
++{
++ int fdm;
++
++ if (openpty (&fdm, fds, pts_name, NULL, NULL) < 0)
++ return (GFTP_ERETRYABLE);
++
++ ioctl (*fds, TIOCSCTTY, NULL);
++
++ return (fdm);
++}
++
++
++static int
++_gftp_ptys_open (int fdm, int fds, char *pts_name)
++{
++ if (login_tty (fds) < 0)
++ return (GFTP_EFATAL);
++
++ return (fds);
++}
++
+ #elif HAVE_GRANTPT
+
+ #include <stropts.h>
+@@ -78,8 +121,8 @@
+
+ if ((fdm = open ("/dev/ptmx", O_RDWR)) < 0)
+ return (GFTP_ERETRYABLE);
+-
+- if (grantpt (fdm) < 0)
++
++ if (grantpt (fdm) < 0)
+ {
+ close (fdm);
+ return (GFTP_ERETRYABLE);
+@@ -123,49 +166,6 @@
+ #endif
+
+ return (new_fds);
+-}
+-
+-#elif HAVE_OPENPTY
+-
+-#ifdef HAVE_PTY_H
+-#include <pty.h>
+-#include <utmp.h> /* for login_tty */
+-#elif HAVE_LIBUTIL_H
+-#include <libutil.h>
+-#include <utmp.h> /* for login_tty */
+-#else
+-extern int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize * winp);
+-extern int login_tty(int fd);
+-#endif
+-
+-char *
+-gftp_get_pty_impl (void)
+-{
+- return ("openpty");
+-}
+-
+-
+-static int
+-_gftp_ptym_open (char *pts_name, size_t len, int *fds)
+-{
+- int fdm;
+-
+- if (openpty (&fdm, fds, pts_name, NULL, NULL) < 0)
+- return (GFTP_ERETRYABLE);
+-
+- ioctl (*fds, TIOCSCTTY, NULL);
+-
+- return (fdm);
+-}
+-
+-
+-static int
+-_gftp_ptys_open (int fdm, int fds, char *pts_name)
+-{
+- if (login_tty (fds) < 0)
+- return (GFTP_EFATAL);
+-
+- return (fds);
+ }
+
+ #else