Fix: error: implicit declaration of function 'puts' is invalid in C99 [-Werror,-Wimplicit-function-declaration] error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] error: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Werror,-Wimplicit-function-declaration] error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration] error: implicit declaration of function 'ioctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration] error: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] --- configure.orig 2007-12-28 21:28:03.000000000 -0600 +++ configure 2020-12-29 21:20:42.000000000 -0600 @@ -23909,6 +23909,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include int main () { @@ -24684,7 +24685,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -int main () { exit (rename ("conftest.1", "conftest.2")); } +int main () { return rename("conftest.1", "conftest.2"); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -27310,7 +27311,7 @@ int main () { - exit (malloc (0) ? 0 : 1); + return malloc(0) ? 0 : 1; } _ACEOF @@ -27391,7 +27392,7 @@ int main () { - exit (realloc (0, 0) ? 0 : 1); + return realloc(0, 0) ? 0 : 1; } _ACEOF --- lib/argmatch.c.orig 2007-12-28 19:37:53.000000000 -0600 +++ lib/argmatch.c 2020-12-29 21:19:51.000000000 -0600 @@ -22,6 +22,7 @@ #include #ifdef STDC_HEADERS +# include # include #endif --- lib/path-concat.c.orig 2007-12-28 19:37:54.000000000 -0600 +++ lib/path-concat.c 2020-12-29 21:22:53.000000000 -0600 @@ -31,7 +31,9 @@ #endif #include -/* char *malloc (); */ +#ifdef HAVE_STDLIB_H +# include +#endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' --- lib/title.c.orig 2007-12-28 19:37:54.000000000 -0600 +++ lib/title.c 2020-12-29 21:28:02.000000000 -0600 @@ -29,6 +29,10 @@ #include +#ifdef HAVE_STRING_H +# include +#endif + #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC # if __STDC__ # include --- lib/tterm.c.orig 2007-12-28 19:37:54.000000000 -0600 +++ lib/tterm.c 2020-12-29 21:26:23.000000000 -0600 @@ -63,7 +63,7 @@ # include #endif -#ifdef HAVE_SYS_IOCTL +#ifdef HAVE_SYS_IOCTL_H # include #endif --- lib/obstack.h.orig 2007-12-28 19:37:59.000000000 -0600 +++ lib/obstack.h 2020-12-29 21:41:26.000000000 -0600 @@ -109,6 +109,10 @@ #ifndef _OBSTACK_H #define _OBSTACK_H 1 +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #ifdef __cplusplus extern "C" { #endif --- src/long-options.c.orig 2007-12-28 19:33:58.000000000 -0600 +++ src/long-options.c 2020-12-29 21:44:25.000000000 -0600 @@ -22,6 +22,9 @@ #endif #include +#ifdef HAVE_STDLIB_H +# include +#endif #include #include "closeout.h" #include "long-options.h"