--- ckermit-9.0.302-origin/ckcmai.c
+++ ckermit-9.0.302/ckcmai.c
@@ -67,6 +67,9 @@
 static char sccsid[] = "@(#)C-Kermit 9.0.302";
 #endif /* UNIX */
 
+/* For time() */
+#include <time.h>
+
 /*
   The C-Kermit Version number is major.minor.edit (integers).
   Major version always goes up.
--- ckermit-9.0.302-origin/ckucmd.h
+++ ckermit-9.0.302/ckucmd.h
@@ -280,9 +280,7 @@
 _PROTOTYP( int cmdgquo, (void) );
 _PROTOTYP( char * ckcvtdate, (char *, int) );
 _PROTOTYP( int cmdgetc, (int));
-#ifndef NOARROWKEYS
 _PROTOTYP( int cmdconchk, (void) );
-#endif /* NOARROWKEYS */
 
 #ifdef CK_RECALL
 _PROTOTYP( char * cmgetcmd, (char *) );
--- ckermit-9.0.302-origin/ckufio.c
+++ ckermit-9.0.302/ckufio.c
@@ -5040,13 +5040,15 @@
             }
             tmx += n;
         }
-        time_stamp = localtime(&tmx);
+        time_t tm = tmx;
+        time_stamp = localtime(&tm);
         debug(F101,"zstrdt tmx 1","",tmx);
         if (!time_stamp)
           return(-1);
 #ifdef COMMENT
         /* Why was this here? */
-        time_stamp = localtime(&tmx);
+        time_t tm = tmx;
+        time_stamp = localtime(&tm);
         debug(F101,"zstrdt tmx 2","",tmx);
 #endif /* COMMENT */
 #ifdef BSD44
@@ -5260,7 +5262,8 @@
   be able to feed it to localtime() and have it converted to a struct tm
   representing the local time equivalent of the given UTC time.
 */
-        time_stamp = localtime(&tmx);
+        time_t tm = tmx;
+        time_stamp = localtime(&tm);
         if (!time_stamp)
           return(NULL);
     }
--- ckermit-9.0.302-origin/ckupty.c
+++ ckermit-9.0.302/ckupty.c
@@ -682,6 +682,8 @@
     return(0);
 }
 
+/* For openpty() */
+#include <pty.h>
 long
 pty_getpty(fd, slave, slavelength) int slavelength; int *fd; char *slave; {
     char *cp;
--- ckermit-9.0.302-origin/ckutio.c
+++ ckermit-9.0.302/ckutio.c
@@ -14123,6 +14123,8 @@
 #endif	/* PTY_NO_NDELAY */
 #endif	/* O_NDELAY */
 
+/* For openpty() */
+#include <pty.h>
 #ifndef HAVE_OPENPTY
 #ifndef USE_CKUPTY_C
 #define USE_CKUPTY_C
--- ckermit-9.0.302-origin/ckuusx.c
+++ ckermit-9.0.302/ckuusx.c
@@ -5877,12 +5877,10 @@
 #endif /* MYCURSES */
 #endif /* VMS */
 
-#ifdef BUG999
 _PROTOTYP(int tgetent,(char *, char *));
 _PROTOTYP(char *tgetstr,(char *, char **));
 _PROTOTYP(int tputs,(char *, int, int (*)()));
 _PROTOTYP(char *tgoto,(const char *, int, int));
-#endif	/* BUG999 */
 
 #endif /* CK_CURSES */
 
--- ckermit-9.0.302-origin/ckwart.c
+++ ckermit-9.0.302/ckwart.c
@@ -528,7 +528,7 @@
 #endif /* CK_SCOV5 */
 #endif /* MAINTYPE */
 #endif /* STRATUS */
-main(argc,argv) int argc; char **argv; {
+void main(argc,argv) int argc; char **argv; {
     trans head;
     int state,c;
     FILE *infile,*outfile;
