[packages/syslinux] - fix building with gcc 14, rel 4

baggins baggins at pld-linux.org
Fri Aug 2 14:19:28 CEST 2024


commit 3811b6e6b0448acd4615ad2a74cf06ce87aef0ae
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Aug 2 13:30:19 2024 +0200

    - fix building with gcc 14, rel 4

 gcc14.patch   | 34 ++++++++++++++++++++++++++++++++++
 syslinux.spec |  4 +++-
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/syslinux.spec b/syslinux.spec
index 0399b27..c4d1ced 100644
--- a/syslinux.spec
+++ b/syslinux.spec
@@ -16,7 +16,7 @@ Summary(pt_BR.UTF-8):	Carregador de boot simples
 Summary(zh_CN.UTF-8):	Linux操作系统的启动管理器
 Name:		syslinux
 Version:	6.04
-Release:	3
+Release:	4
 License:	GPL v2+
 Group:		Applications/System
 # Source0:	https://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{version}.tar.xz
@@ -31,6 +31,7 @@ Patch11:	0016-strip-gnu-property.patch
 Patch12:	0017-single-load-segment.patch
 Patch13:	0018-prevent-pow-optimization.patch
 Patch14:	0019-gcc-10-compatibility.patch
+Patch15:	gcc14.patch
 URL:		http://syslinux.zytor.com/
 BuildRequires:	gnu-efi >= 3.0u
 BuildRequires:	libuuid-devel
@@ -109,6 +110,7 @@ jeśli chcemy tworzyć lub kompilować własnych klientów syslinuksa.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 %{__sed} -i 's/-march=i386//' sample/Makefile
 
diff --git a/gcc14.patch b/gcc14.patch
new file mode 100644
index 0000000..07676cd
--- /dev/null
+++ b/gcc14.patch
@@ -0,0 +1,34 @@
+diff --git a/com32/chain/chain.c b/com32/chain/chain.c
+--- a/com32/chain/chain.c
++++ b/com32/chain/chain.c
+@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
+     if (opt.file) {
+ 	fdat.base = (opt.fseg << 4) + opt.foff;
+ 
+-	if (loadfile(opt.file, &fdat.data, &fdat.size)) {
++	if (loadfile(opt.file, &fdat.data, (size_t*)&fdat.size)) {
+ 	    error("Couldn't read the boot file.");
+ 	    goto bail;
+ 	}
+diff --git a/com32/lib/syslinux/debug.c b/com32/lib/syslinux/debug.c
+--- a/com32/lib/syslinux/debug.c
++++ b/com32/lib/syslinux/debug.c
+@@ -1,6 +1,7 @@
+ #include <linux/list.h>
+ #include <string.h>
+ #include <stdbool.h>
++#include <stdio.h>
+ 
+ #ifdef DYNAMIC_DEBUG
+ 
+diff --git a/com32/libupload/tftp.h b/com32/libupload/tftp.h
+--- a/com32/libupload/tftp.h
++++ b/com32/libupload/tftp.h
+@@ -19,4 +19,7 @@ TFTP_OK	= 11, /* Not in RFC */
+ };
+ 
+ extern const char *tftp_string_error_message[];
++
++extern int tftp_put(struct url_info *url, int flags, struct inode *inode,
++                               const char **redir, char *data, int data_length);
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/syslinux.git/commitdiff/3811b6e6b0448acd4615ad2a74cf06ce87aef0ae



More information about the pld-cvs-commit mailing list