Fix build with mingw-gcc 14
https://fedoraproject.org/wiki/Changes/PortingToModernC https://fedoraproject.org/wiki/Changes/GNUToolchainF40
This commit is contained in:
parent
2e9425ccab
commit
982c40d4b5
@ -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
|
||||
|
20
termcap-1.3.1-implicit.patch
Normal file
20
termcap-1.3.1-implicit.patch
Normal file
@ -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 <unistd.h>
|
||||
+#endif
|
||||
+
|
||||
#endif /* not emacs */
|
||||
|
||||
#ifndef NULL
|
Loading…
Reference in New Issue
Block a user