diff --git a/mingw-termcap.spec b/mingw-termcap.spec index fa44c2a..924378e 100644 --- a/mingw-termcap.spec +++ b/mingw-termcap.spec @@ -18,6 +18,8 @@ Summary: MinGW terminal feature database License: GPL-2.0-or-later URL: ftp://ftp.gnu.org/gnu/termcap/ Source0: ftp://ftp.gnu.org/gnu/termcap/termcap-%{version}.tar.gz +# Fix implicit function declarations +Patch0: termcap-1.3.1-implicit.patch BuildArch: noarch @@ -92,6 +94,7 @@ Static version of the cross compiled termcap library. %prep %setup -q -n termcap-%{version} +%patch -P0 -p1 # Packaged script doesn't understand --bindir, so rebuild: autoconf diff --git a/termcap-1.3.1-implicit.patch b/termcap-1.3.1-implicit.patch new file mode 100644 index 0000000..586fb7c --- /dev/null +++ b/termcap-1.3.1-implicit.patch @@ -0,0 +1,20 @@ +FTBFS with mingw-gcc 14: + +../tparam.c: In function 'memory_out': +../tparam.c:51:3: error: implicit declaration of function 'write' [-Wimplicit-function-declaration] + +diff --git a/tparam.c b/tparam.c +index 5a9809a..c9aceb1 100644 +--- a/tparam.c ++++ b/tparam.c +@@ -38,6 +38,10 @@ char *realloc (); + #define bcopy(s, d, n) memcpy ((d), (s), (n)) + #endif + ++#ifdef HAVE_UNISTD_H ++#include ++#endif ++ + #endif /* not emacs */ + + #ifndef NULL