| 1 | From 321433861cc9cd3c7e0ee02830e561bc0f956998 Mon Sep 17 00:00:00 2001
|
| 2 | From: rpm-build <rpm-build>
|
| 3 | Date: Sun, 4 Feb 2024 11:46:02 -0500
|
| 4 | Subject: [PATCH] Fix build with GCC 14
|
| 5 |
|
| 6 | com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
|
| 7 | com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’
|
| 8 |
|
| 9 | com32/libupload/upload_tftp.c: In function ‘upload_tftp_write’:
|
| 10 | com32/libupload/upload_tftp.c:64:11: error: implicit declaration of function ‘tftp_put’
|
| 11 |
|
| 12 | com32/chain/chain.c: In function ‘main’:
|
| 13 | com32/chain/chain.c:517:44: error: passing argument 3 of ‘loadfile’ from incompatible pointer type
|
| 14 | com32/include/syslinux/loadfile.h:11:37: note: expected ‘size_t *’ but argument is of type ‘addr_t *’
|
| 15 |
|
| 16 | ---
|
| 17 | com32/chain/chain.c | 2 +-
|
| 18 | com32/lib/syslinux/debug.c | 1 +
|
| 19 | com32/libupload/tftp.h | 3 +++
|
| 20 | 3 files changed, 5 insertions(+), 1 deletion(-)
|
| 21 |
|
| 22 | diff --git a/com32/chain/chain.c b/com32/chain/chain.c
|
| 23 | index 4e9e32d..b11b880 100644
|
| 24 | |
| 25 | |
| 26 | @@ -514,7 +514,7 @@ int main(int argc, char *argv[])
|
| 27 | if (opt.file) {
|
| 28 | fdat.base = (opt.fseg << 4) + opt.foff;
|
| 29 |
|
| 30 | - if (loadfile(opt.file, &fdat.data, &fdat.size)) {
|
| 31 | + if (loadfile(opt.file, &fdat.data, (size_t*)&fdat.size)) {
|
| 32 | error("Couldn't read the boot file.");
|
| 33 | goto bail;
|
| 34 | }
|
| 35 | diff --git a/com32/lib/syslinux/debug.c b/com32/lib/syslinux/debug.c
|
| 36 | index d9ab863..e8f53d5 100644
|
| 37 | |
| 38 | |
| 39 | @@ -1,6 +1,7 @@
|
| 40 | #include <linux/list.h>
|
| 41 | #include <string.h>
|
| 42 | #include <stdbool.h>
|
| 43 | +#include <stdio.h>
|
| 44 |
|
| 45 | #ifdef DYNAMIC_DEBUG
|
| 46 |
|
| 47 | diff --git a/com32/libupload/tftp.h b/com32/libupload/tftp.h
|
| 48 | index 323dc16..09aa40b 100644
|
| 49 | |
| 50 | |
| 51 | @@ -19,4 +19,7 @@ TFTP_OK = 11, /* Not in RFC */
|
| 52 | };
|
| 53 |
|
| 54 | extern const char *tftp_string_error_message[];
|
| 55 | +
|
| 56 | +extern int tftp_put(struct url_info *url, int flags, struct inode *inode,
|
| 57 | + const char **redir, char *data, int data_length);
|
| 58 | #endif
|
| 59 | --
|
| 60 | 2.43.0
|
| 61 |
|