diff -ruN irc2.7h/common/support.c irc2.7h-patched/common/support.c
--- irc2.7h/common/support.c	1991-12-30 03:07:17.000000000 +0800
+++ irc2.7h-patched/common/support.c	2018-07-13 11:26:55.357213800 +0800
@@ -100,8 +100,8 @@
 char *strerror(err_no)
 int err_no;
 {
-    extern char *sys_errlist[];	 /* Sigh... hopefully on all systems */
-    extern int sys_nerr;
+//    extern char *sys_errlist[];	 /* Sigh... hopefully on all systems */
+//    extern int sys_nerr;
 
     return(err_no > sys_nerr ? 
 	"Undefined system error" : sys_errlist[err_no]);
diff -ruN irc2.7h/irc/edit.c irc2.7h-patched/irc/edit.c
--- irc2.7h/irc/edit.c	1991-12-30 03:07:32.000000000 +0800
+++ irc2.7h-patched/irc/edit.c	2018-07-13 11:35:44.837546100 +0800
@@ -219,7 +219,8 @@
 #endif
 #else
 #if !VMS
-  tstp(); 
+//  This is missing...?
+//  tstp(); 
 #endif
 #endif
 }
diff -ruN irc2.7h/irc/irc.c irc2.7h-patched/irc/irc.c
--- irc2.7h/irc/irc.c	1991-12-30 03:07:32.000000000 +0800
+++ irc2.7h-patched/irc/irc.c	2018-07-13 14:45:25.361674300 +0800
@@ -76,7 +76,7 @@
 #include "irc.h"
 
 extern char *HEADER;
-int timeout();
+//int timeout();
 char buf[BUFSIZE];
 aChannel *channel = (aChannel *) 0;
 static char currserver[HOSTLEN + 1];
@@ -854,8 +854,11 @@
 	return;
 	}
 
-    if (querychannel)
-	free((char *)querychannel);
+//  This free causes the client to crash when joining a channel.
+//  Zero investigation has gone into why this occurs.
+//
+//    if (querychannel)
+//	free((char *)querychannel);
 
     if (querychannel = (char *)malloc(strlen(ptr) + 1))
 	strcpy(querychannel, ptr);
diff -ruN irc2.7h/irc/Makefile irc2.7h-patched/irc/Makefile
--- irc2.7h/irc/Makefile	1991-12-30 03:07:31.000000000 +0800
+++ irc2.7h-patched/irc/Makefile	2018-07-13 11:35:10.433251800 +0800
@@ -37,7 +37,7 @@
 #IRCLIBS=-lcurses -lcur
 IRCLIBS=-lcurses -ltermcap
 
-CC=/bin/cc
+CC=cc
 RM=/bin/rm
 OBJS=c_bsd.o c_conf.o c_msg.o c_numeric.o c_version.o edit.o help.o ignore.o\
      irc.o screen.o str.o c_debug.o
diff -ruN irc2.7h/ircd/channel.h irc2.7h-patched/ircd/channel.h
--- irc2.7h/ircd/channel.h	1991-12-30 03:07:18.000000000 +0800
+++ irc2.7h-patched/ircd/channel.h	2018-07-13 11:28:30.691464800 +0800
@@ -51,4 +51,4 @@
 extern void remove_user_from_channel PROTO((aClient *, aChannel *));
 
 extern void add_invite PROTO((aClient *, aChannel *));
-extern void del_invite PROTO((aClient *));
+extern void del_invite PROTO((aClient *,aChannel *));
diff -ruN irc2.7h/ircd/date.c irc2.7h-patched/ircd/date.c
--- irc2.7h/ircd/date.c	1991-12-30 03:07:18.000000000 +0800
+++ irc2.7h-patched/ircd/date.c	2018-07-13 11:32:12.445937600 +0800
@@ -33,6 +33,8 @@
 char date_id[]="date.c v2.0 (c) 1988 University of Oulu, Computing Center and Jarkko Oikarinen";
 
 #include <stdio.h>
+#include <time.h>
+#include <sys/time.h>
 #include "config.h"
 #include "common.h"
 #include "sys.h"
@@ -58,7 +60,7 @@
   struct timezone tzp;
   char *timezonename;
 #if !(HPUX || AIX)
-  extern char *timezone();
+//  extern char *timezone();
 #endif
 
   if (!clock) 
@@ -70,7 +72,8 @@
   tzset();
   timezonename = tzname[ltbuf->tm_isdst];
 #else
-  timezonename = timezone(tzp.tz_minuteswest, ltbuf->tm_isdst);
+//  timezonename = timezone(tzp.tz_minuteswest, ltbuf->tm_isdst);
+  timezonename = "5EST5EDT";
 #endif
 
   sprintf(buf, "%s %s %d 19%02d -- %02d:%02d %s",
diff -ruN irc2.7h/ircd/hash.c irc2.7h-patched/ircd/hash.c
--- irc2.7h/ircd/hash.c	1991-12-30 03:07:19.000000000 +0800
+++ irc2.7h-patched/ircd/hash.c	2018-07-13 11:34:33.477156200 +0800
@@ -119,7 +119,7 @@
 				    hash_channel_name(name)));
 }
 
-static	int	add_hash_table_link(cptr, table, hashv)
+int	add_hash_table_link(cptr, table, hashv)
 void	*cptr;
 aHashEntry	table[];
 int	hashv;
@@ -153,7 +153,7 @@
 				    hash_channel_name(name)));
 }
 
-static	int	del_hash_table_link(cptr, table, hashv)
+int	del_hash_table_link(cptr, table, hashv)
 aClient	*cptr;
 aHashEntry	table[];
 int	hashv;
diff -ruN irc2.7h/ircd/ircd.c irc2.7h-patched/ircd/ircd.c
--- irc2.7h/ircd/ircd.c	1991-12-30 03:10:35.000000000 +0800
+++ irc2.7h-patched/ircd/ircd.c	2018-07-13 11:31:29.500350100 +0800
@@ -314,7 +314,7 @@
 	int length;		/* Length of message received from client */
 	char buffer[BUFSIZE];
 	long delay, now;
-	static int open_log();
+//	static int open_log();
 
 	myargv = argv;
 	umask(077);                /* better safe than sorry --SRB */
@@ -521,7 +521,7 @@
 	    }
     }
 
-static int open_log()
+int open_log()
     {
 	int fd;
 	if (debuglevel >= 0)
diff -ruN irc2.7h/ircd/s_conf.c irc2.7h-patched/ircd/s_conf.c
--- irc2.7h/ircd/s_conf.c	1991-12-30 03:07:19.000000000 +0800
+++ irc2.7h-patched/ircd/s_conf.c	2018-07-13 11:33:10.131125200 +0800
@@ -61,6 +61,8 @@
 #include "sys.h"
 #include "numeric.h"
 #include <stdio.h>
+#include <time.h>
+#include <sys/time.h>
 #include <netdb.h>
 #include <sys/socket.h>
 #ifdef __hpux
@@ -703,7 +705,7 @@
 char *host, *name, *reply;
     {
 	aConfItem *tmp;
-	static int check_time_interval();
+//	static int check_time_interval();
 	int rc = ERR_YOUREBANNEDCREEP;
 
 	if (strlen(host)  > HOSTLEN || (name ? strlen(name) : 0) > HOSTLEN)
@@ -778,7 +780,7 @@
 ** check against a set of time intervals
 */
 
-static int check_time_interval(interval, reply)
+int check_time_interval(interval, reply)
 char	*interval, *reply;
 {
 	struct tm *tptr;
diff -ruN irc2.7h/ircd/s_msg.c irc2.7h-patched/ircd/s_msg.c
--- irc2.7h/ircd/s_msg.c	1991-12-30 03:07:19.000000000 +0800
+++ irc2.7h-patched/ircd/s_msg.c	2018-07-13 11:33:53.404974700 +0800
@@ -2256,7 +2256,7 @@
     {
 	Reg1 aClient *acptr;
 	Reg2 aClient *next;
-	static int exit_one_client();
+	//int exit_one_client();
 
 	if (MyConnect(sptr))
 	    {
@@ -2338,7 +2338,7 @@
 ** Exit one client, local or remote. Assuming all dependants have
 ** been already removed, and socket closed for local client.
 */
-static exit_one_client(cptr, sptr, from, comment)
+int exit_one_client(cptr, sptr, from, comment)
 aClient *sptr;
 aClient *cptr;
 aClient *from;
