aboutsummaryrefslogtreecommitdiff
path: root/ftp
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2010-01-17 15:44:29 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2010-01-17 15:44:29 +0000
commit24024b543978ca185b7d2f7c26d2e629beb3e173 (patch)
tree633010fb47aa764b1680c07e7a9bb55c38c584a0 /ftp
parent199bdcb0af6b9b9fdd44db3e87803b15e4d07fba (diff)
downloadports-24024b543978ca185b7d2f7c26d2e629beb3e173.tar.gz
ports-24024b543978ca185b7d2f7c26d2e629beb3e173.zip
use utmpx.h instead of utmp.h if exists
Notes
Notes: svn path=/head/; revision=248014
Diffstat (limited to 'ftp')
-rw-r--r--ftp/gftp/Makefile1
-rw-r--r--ftp/gftp/files/patch-config.h.in12
-rw-r--r--ftp/gftp/files/patch-lib::pty.c10
3 files changed, 22 insertions, 1 deletions
diff --git a/ftp/gftp/Makefile b/ftp/gftp/Makefile
index e09e984a0043..b8845206e311 100644
--- a/ftp/gftp/Makefile
+++ b/ftp/gftp/Makefile
@@ -69,6 +69,7 @@ PLIST_SUB+= MYGNOME="@comment "
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
s|DATADIRNAME=lib|DATADIRNAME=share|g ; \
+ s|pty.h|utmpx.h &|g ; \
s|"-lssl |& -lcrypto|' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|size_t dest_len|size_t *dest_len|g ; \
s|\(gftp_filename_from_utf8 (gftp_request \* request,\) int force_local,|\1|' \
diff --git a/ftp/gftp/files/patch-config.h.in b/ftp/gftp/files/patch-config.h.in
new file mode 100644
index 000000000000..50ef8adcde1d
--- /dev/null
+++ b/ftp/gftp/files/patch-config.h.in
@@ -0,0 +1,12 @@
+--- config.h.in.orig 2010-01-17 16:28:14.000000000 +0100
++++ config.h.in 2010-01-17 16:28:38.000000000 +0100
+@@ -198,6 +198,9 @@
+ /* Define if the POSIX multithreading library has read/write locks. */
+ #undef HAVE_PTHREAD_RWLOCK
+
++/* Define to 1 if you have the <utmpx.h> header file. */
++#undef HAVE_UTMPX_H
++
+ /* Define to 1 if you have the <pty.h> header file. */
+ #undef HAVE_PTY_H
+
diff --git a/ftp/gftp/files/patch-lib::pty.c b/ftp/gftp/files/patch-lib::pty.c
index 21423eea8079..df2ca279495c 100644
--- a/ftp/gftp/files/patch-lib::pty.c
+++ b/ftp/gftp/files/patch-lib::pty.c
@@ -1,6 +1,6 @@
--- 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 @@
+@@ -59,6 +59,57 @@
return (new_fds);
}
@@ -8,10 +8,18 @@
+
+#ifdef HAVE_PTY_H
+#include <pty.h>
++#ifdef HAVE_UTMPX_H
++#include <utmpx.h>
++#else
+#include <utmp.h> /* for login_tty */
++#endif
+#elif HAVE_LIBUTIL_H
+#include <libutil.h>
++#ifdef HAVE_UTMPX_H
++#include <utmpx.h>
++#else
+#include <utmp.h> /* for login_tty */
++#endif
+#else
+extern int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize * winp);
+extern int login_tty(int fd);