Misc. small changes to remove uses of unavailable functions in telnetd.
Also include libutil for login_tty function.
This commit is contained in:
parent
1c8d72b2d1
commit
1d35c61146
|
@ -56,7 +56,7 @@ OBJS = $(LIBTELNET_OBJS) $(TELNET_OBJS) $(TELNETD_OBJS)
|
|||
|
||||
INCLUDES = -I libtelnet -I .
|
||||
TELNET_DEFINES = -DTERMCAP -DKLUDGELINEMODE -DENV_HACK
|
||||
TELNETD_DEFINES = -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK -DSTREAMSPTY
|
||||
TELNETD_DEFINES = -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK
|
||||
TELNET_SPECIFIC = $(TELNET_DEFINES) -I telnet
|
||||
TELNETD_SPECIFIC = $(TELNETD_DEFINES) -I telnetd
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# from 2.0.6 is broken (links to unimplemented functions), so don't use it.
|
||||
# The 2.0.4 version is in the "lib.shk" file within
|
||||
# ftp://ftp.gno.org/pub/apple2/gs.specific/gno/base/v204/gnodisk1.sdk
|
||||
LIBS = -l/usr/lib/libtermcap.204 -l/usr/lib/libnetdb
|
||||
LIBS = -l/usr/lib/libtermcap.204 -l/usr/lib/libnetdb -l/usr/lib/libutil
|
||||
|
||||
CFLAGS = -i -w
|
||||
|
||||
|
|
|
@ -907,10 +907,12 @@ cleanopen(char *li)
|
|||
* Make sure that other people can't open the
|
||||
* slave side of the connection.
|
||||
*/
|
||||
#ifndef __GNO__
|
||||
(void) chown(li, 0, 0);
|
||||
(void) chmod(li, 0600);
|
||||
|
||||
(void) revoke(li);
|
||||
#endif
|
||||
|
||||
t = open(line, O_RDWR|O_NOCTTY);
|
||||
|
||||
|
|
|
@ -718,7 +718,7 @@ doit(struct sockaddr *who_)
|
|||
host = inet_ntoa(who->sin_addr);
|
||||
break;
|
||||
}
|
||||
if (!bcmp(hp->h_addr_list[0], (caddr_t)&who->sin_addr,
|
||||
if (!memcmp(hp->h_addr_list[0], (caddr_t)&who->sin_addr,
|
||||
sizeof(who->sin_addr))) {
|
||||
host = hp->h_name;
|
||||
break; /* OK! */
|
||||
|
|
|
@ -420,7 +420,9 @@ putf(char *cp, char *where)
|
|||
{
|
||||
char *slash;
|
||||
time_t t;
|
||||
#ifndef __GNO__
|
||||
char db[100];
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
static struct utsname kerninfo;
|
||||
|
||||
|
@ -463,8 +465,12 @@ putf(char *cp, char *where)
|
|||
setlocale(LC_TIME, "");
|
||||
#endif
|
||||
(void)time(&t);
|
||||
#ifndef __GNO__
|
||||
(void)strftime(db, sizeof(db), fmtstr, localtime(&t));
|
||||
putstr(db);
|
||||
#else
|
||||
putstr(ctime(&t));
|
||||
#endif
|
||||
break;
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
|
|
Loading…
Reference in New Issue