Description: Fix gcc-15 implicit function declarations and implicit int
 Add missing #include <stdlib.h> and #include <unistd.h> so that atoi,
 exit, malloc and isatty are declared; add a forward declaration of the
 local getstr() function; and give main() an explicit int return type.
 gcc-15 treats implicit function declarations and implicit int as errors
 by default, breaking these K&R-style sources.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-04

--- kcc-2.3+really.orig/kcc.c
+++ kcc-2.3+really/kcc.c
@@ -27,7 +27,9 @@ static char copyright[] = "@(#)Copyright
 #endif
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -135,6 +137,7 @@ extern unsigned short hiragana[];
 unsigned short *kanatbl = katakana;
 
 void error(char *fmt, ...);
+int getstr(char *str, int n, FILE *fp);
 
 /**********************************************************************
  *                                                                    *
@@ -145,7 +148,7 @@ void error(char *fmt, ...);
     NAME
 	main
  ---------------------------------------------------------------------*/
-main(c, v)
+int main(c, v)
     register int c;
     register char *v[];
 {
