Fix: conftest.c:51:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] getopt.c:576:30: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration] getopt.c:655:21: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration] utils.c:96:4: error: implicit declaration of function 'unlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration] sed.c:178:3: error: implicit declaration of function 'initialize_mbcs' is invalid in C99 [-Werror,-Wimplicit-function-declaration] --- configure.orig 2005-02-08 11:31:24.000000000 -0600 +++ configure 2021-02-14 00:09:59.000000000 -0600 @@ -3376,8 +3376,8 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext @@ -5738,7 +5738,7 @@ if (!in) return 1; len = getline (&line, &siz, in); - exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); + return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1; } _ACEOF --- lib/getopt.c.orig 2004-11-06 05:37:29.000000000 -0600 +++ lib/getopt.c 2021-02-14 00:18:13.000000000 -0600 @@ -43,6 +43,7 @@ #endif #include +#include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C --- lib/utils.c.orig 2004-11-06 05:37:29.000000000 -0600 +++ lib/utils.c 2021-02-14 00:13:38.000000000 -0600 @@ -35,6 +35,10 @@ # include #endif /* HAVE_STDLIB_H */ +#ifdef HAVE_UNISTD_H +# include +#endif + #include "utils.h" const char *myname; --- sed/sed.c.orig 2004-11-11 08:33:59.000000000 -0600 +++ sed/sed.c 2021-02-14 00:23:06.000000000 -0600 @@ -59,6 +59,8 @@ # define ATOI(x) strtoul(x, NULL, 0) #endif +extern void initialize_mbcs(); + int extended_regexp_flags = 0; /* If set, fflush(stdout) on every line output. */