Dear all,
the patch text below is all that is needed to support NetBSD 5.1.
The resulting binaries pass every test, except "ftp-localhost"
due to the usual lack of a user "ftp".
There are two issues in the present source tree, one straight
and one unfortunate!
First off, as a single exception among all BSD decendants,
NetBSD implements UTMPX. This can be accounted for within
"configure.ac", exactly as we do it for Solaris.
This is I suppose fine, not that it is pretty. Could you put the
NetBSD case on the same line as IRIX and HPUX?
diff --git a/telnet/commands.c b/telnet/commands.c
index a2db7fe..34d210a 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -429,7 +429,11 @@ int
send_tncmd (void (*func) (), char *cmd, char *name)
{
char **cpp;
+ /* FIXME: [!TELOPTS] NetBSD declares a replacement in <arpa/telnet.h>.
+ * This is the only known case! */
+#ifndef __NetBSD__
No, no, no. :-)
diff --git a/configure.ac b/configure.ac
index e4af8a6..c38a199 100644
--- a/configure.ac
+++ b/configure.ac
@@ -670,6 +670,8 @@ if test "$ac_cv_func_hstrerror" = yes \
AC_DEFINE([HAVE_HSTRERROR], 1, [Define to one if you have hstrerror.])
fi
+AC_CHECK_DECLS(telopts, , , [#include <arpa/telnet.h])
+
## Checks for function declarations.
AC_DECL_SYS_SIGLIST
diff --git a/telnet/commands.c b/telnet/commands.c
index a2db7fe..ef708d4 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -429,7 +429,9 @@ int
send_tncmd (void (*func) (), char *cmd, char *name)
{
char **cpp;
+#if !HAVE_DECL_TELOPTS
extern char *telopts[];
+#endif
register int val = 0;
if (isprefix (name, "help") || isprefix (name, "?"))