summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorexplorer <explorer@NetBSD.org>1997-01-29 10:30:14 +0000
committerexplorer <explorer@NetBSD.org>1997-01-29 10:30:14 +0000
commitc80b5ae4090c6ed48e99644b98e7a1cfa4e1b133 (patch)
treed47ae0a3c8242744b8a9cca8700b9ad11bcf5afc /libexec
parent143a02016e555f410157d03f1a2ba435c95a7674 (diff)
Doh! MAXHOSTNAMELEN, not MAXHOSTNAME
Diffstat (limited to 'libexec')
-rw-r--r--libexec/talkd/talkd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c
index 29b8224219f..bc5244b7efa 100644
--- a/libexec/talkd/talkd.c
+++ b/libexec/talkd/talkd.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)talkd.c 5.8 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: talkd.c,v 1.3 1997/01/29 03:21:01 explorer Exp $";
+static char rcsid[] = "$Id: talkd.c,v 1.4 1997/01/29 10:30:14 explorer Exp $";
#endif /* not lint */
/*
@@ -50,6 +50,8 @@ static char rcsid[] = "$Id: talkd.c,v 1.3 1997/01/29 03:21:01 explorer Exp $";
*/
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/param.h>
+
#include <protocols/talkd.h>
#include <signal.h>
#include <syslog.h>
@@ -69,7 +71,7 @@ int debug = 0;
void timeout();
long lastmsgtime;
-char hostname[MAXHOSTNAME + 1];
+char hostname[MAXHOSTNAMELEN + 1];
#define TIMEOUT 30
#define MAXIDLE 120
@@ -90,7 +92,7 @@ main(argc, argv)
syslog(LOG_ERR, "gethostname: %m");
_exit(1);
}
- hostname[MAXHOSTNAME] = 0; /* ensure null termination */
+ hostname[MAXHOSTNAMELEN] = 0; /* ensure null termination */
if (chdir(_PATH_DEV) < 0) {
syslog(LOG_ERR, "chdir: %s: %m", _PATH_DEV);
_exit(1);