summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch')
-rw-r--r--net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch b/net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch
new file mode 100644
index 000000000000..8795776bba5f
--- /dev/null
+++ b/net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch
@@ -0,0 +1,82 @@
+diff -ur telnet-bsd-1.2/configure.in telnet-bsd-1.2-fbsd/configure.in
+--- telnet-bsd-1.2/configure.in 2005-06-01 17:33:16.000000000 +0200
++++ telnet-bsd-1.2-fbsd/configure.in 2005-08-13 12:14:20.000000000 +0200
+@@ -12,6 +12,8 @@
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
++AC_CHECK_HEADERS([pty.h])
++
+ if test x"$ac_default_prefix" = x"/usr"
+ then
+ if test x"${mandir}" = x'${prefix}/man'
+diff -ur telnet-bsd-1.2/telnet/commands.c telnet-bsd-1.2-fbsd/telnet/commands.c
+--- telnet-bsd-1.2/telnet/commands.c 2005-06-02 10:12:51.000000000 +0200
++++ telnet-bsd-1.2-fbsd/telnet/commands.c 2005-08-13 12:18:14.000000000 +0200
+@@ -29,11 +29,13 @@
+
+ #include "telnet_locl.h"
+ #include <err.h>
++#include <unistd.h>
+
+ #if defined(IPPROTO_IP) && defined(IP_TOS)
+ int tos = -1;
+ #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */
+
++extern char **environ;
+ char *hostname;
+
+ typedef int (*intrtn_t) __P ((int, char **));
+diff -ur telnet-bsd-1.2/telnet/ring.h telnet-bsd-1.2-fbsd/telnet/ring.h
+--- telnet-bsd-1.2/telnet/ring.h 2004-02-13 22:52:55.000000000 +0100
++++ telnet-bsd-1.2-fbsd/telnet/ring.h 2005-08-13 12:10:45.000000000 +0200
+@@ -29,6 +29,7 @@
+ */
+
+ #include <sys/cdefs.h>
++#include <sys/types.h>
+ #define P __P
+
+ /*
+diff -ur telnet-bsd-1.2/telnetd/setproctitle.c telnet-bsd-1.2-fbsd/telnetd/setproctitle.c
+--- telnet-bsd-1.2/telnetd/setproctitle.c 2004-02-13 23:18:07.000000000 +0100
++++ telnet-bsd-1.2-fbsd/telnetd/setproctitle.c 2005-08-13 12:25:56.000000000 +0200
+@@ -72,6 +72,7 @@
+ static char **Argv = NULL; /* pointer to argument vector */
+ static char *LastArgv = NULL; /* end of argv */
+ static char Argv0[128]; /* program name */
++extern char **environ;
+
+ void
+ initsetproctitle(int argc, char **argv, char **envp)
+@@ -86,10 +87,10 @@
+
+ for (i = 0; envp[i] != NULL; i++)
+ continue;
+- __environ = (char **) malloc(sizeof (char *) * (i + 1));
++ environ = (char **) malloc(sizeof (char *) * (i + 1));
+ for (i = 0; envp[i] != NULL; i++)
+- __environ[i] = strdup(envp[i]);
+- __environ[i] = NULL;
++ environ[i] = strdup(envp[i]);
++ environ[i] = NULL;
+
+ /*
+ ** Save start and extent of argv for setproctitle.
+diff -ur telnet-bsd-1.2/telnetd/sys_term.c telnet-bsd-1.2-fbsd/telnetd/sys_term.c
+--- telnet-bsd-1.2/telnetd/sys_term.c 2005-06-01 13:42:23.000000000 +0200
++++ telnet-bsd-1.2-fbsd/telnetd/sys_term.c 2005-08-13 12:14:30.000000000 +0200
+@@ -27,8 +27,13 @@
+ * SUCH DAMAGE.
+ */
+
++#include <config.h>
++
++#include <sys/types.h>
+ #include <utmp.h>
++#ifdef HAVE_PTY_H
+ #include <pty.h>
++#endif
+
+ #include "telnetd.h"
+ #include "pathnames.h"