diff options
| -rw-r--r-- | meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-build-with-GCC-15.patch | 186 | ||||
| -rw-r--r-- | meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 |
2 files changed, 187 insertions, 0 deletions
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-build-with-GCC-15.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-build-with-GCC-15.patch new file mode 100644 index 0000000000..e5e9125eea --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0001-Fix-build-with-GCC-15.patch | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | From 3739faa41f60841d5277344b17ddc69e78ed8996 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 22 Mar 2025 22:58:33 -0700 | ||
| 4 | Subject: [PATCH] Fix build with GCC 15 | ||
| 5 | |||
| 6 | This is collection of changes needed to get compiling with gcc-15 | ||
| 7 | which switched to use C23 as default std. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/UweOhse/lrzsz/pull/8] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | lib/error.c | 2 +- | ||
| 13 | lib/getopt.h | 2 +- | ||
| 14 | lib/long-options.c | 4 ++-- | ||
| 15 | lib/long-options.h | 2 +- | ||
| 16 | lib/xstrtol.c | 2 -- | ||
| 17 | src/lrz.c | 8 +------- | ||
| 18 | src/lsz.c | 8 +------- | ||
| 19 | src/tcp.c | 2 +- | ||
| 20 | src/zglobal.h | 2 +- | ||
| 21 | src/zreadline.c | 2 +- | ||
| 22 | 10 files changed, 10 insertions(+), 24 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/lib/error.c b/lib/error.c | ||
| 25 | index 8f679c7..4632c9c 100644 | ||
| 26 | --- a/lib/error.c | ||
| 27 | +++ b/lib/error.c | ||
| 28 | @@ -73,7 +73,7 @@ extern char *program_name; | ||
| 29 | |||
| 30 | # if HAVE_STRERROR | ||
| 31 | # ifndef strerror /* On some systems, strerror is a macro */ | ||
| 32 | -char *strerror (); | ||
| 33 | +char *strerror (int); | ||
| 34 | # endif | ||
| 35 | # else | ||
| 36 | static char * | ||
| 37 | diff --git a/lib/getopt.h b/lib/getopt.h | ||
| 38 | index 4ac33b7..46971cb 100644 | ||
| 39 | --- a/lib/getopt.h | ||
| 40 | +++ b/lib/getopt.h | ||
| 41 | @@ -101,7 +101,7 @@ struct option | ||
| 42 | errors, only prototype getopt for the GNU C library. */ | ||
| 43 | extern int getopt (int argc, char *const *argv, const char *shortopts); | ||
| 44 | #else /* not __GNU_LIBRARY__ */ | ||
| 45 | -extern int getopt (); | ||
| 46 | +extern int getopt (int, char * const [], const char *); | ||
| 47 | #endif /* __GNU_LIBRARY__ */ | ||
| 48 | extern int getopt_long (int argc, char *const *argv, const char *shortopts, | ||
| 49 | const struct option *longopts, int *longind); | ||
| 50 | diff --git a/lib/long-options.c b/lib/long-options.c | ||
| 51 | index 9ee8f66..2c8d267 100644 | ||
| 52 | --- a/lib/long-options.c | ||
| 53 | +++ b/lib/long-options.c | ||
| 54 | @@ -40,7 +40,7 @@ parse_long_options (argc, argv,version, usage) | ||
| 55 | int argc; | ||
| 56 | char **argv; | ||
| 57 | void (*version)(); | ||
| 58 | - void (*usage)(); | ||
| 59 | + void (*usage)(int); | ||
| 60 | { | ||
| 61 | int c; | ||
| 62 | int saved_opterr; | ||
| 63 | @@ -61,7 +61,7 @@ parse_long_options (argc, argv,version, usage) | ||
| 64 | (*usage) (0); | ||
| 65 | |||
| 66 | case 'v': | ||
| 67 | - (*version) (0); | ||
| 68 | + (*version) (); | ||
| 69 | /* printf ("%s (%s) %s\n", command_name, package, version_string); */ | ||
| 70 | exit (0); | ||
| 71 | |||
| 72 | diff --git a/lib/long-options.h b/lib/long-options.h | ||
| 73 | index 14459cd..3fb8fa6 100644 | ||
| 74 | --- a/lib/long-options.h | ||
| 75 | +++ b/lib/long-options.h | ||
| 76 | @@ -6,5 +6,5 @@ | ||
| 77 | #endif | ||
| 78 | |||
| 79 | void parse_long_options __P ((int _argc, char **_argv, | ||
| 80 | - void (*_version) (void), | ||
| 81 | + void (*_version) (), | ||
| 82 | void (*_usage) (int))); | ||
| 83 | diff --git a/lib/xstrtol.c b/lib/xstrtol.c | ||
| 84 | index 8755cf4..0ab337d 100644 | ||
| 85 | --- a/lib/xstrtol.c | ||
| 86 | +++ b/lib/xstrtol.c | ||
| 87 | @@ -65,8 +65,6 @@ extern int errno; | ||
| 88 | } \ | ||
| 89 | while (0) | ||
| 90 | |||
| 91 | -__unsigned long int __strtol (); | ||
| 92 | - | ||
| 93 | /* FIXME: comment. */ | ||
| 94 | |||
| 95 | strtol_error | ||
| 96 | diff --git a/src/lrz.c b/src/lrz.c | ||
| 97 | index b3cf1d5..ae3c62d 100644 | ||
| 98 | --- a/src/lrz.c | ||
| 99 | +++ b/src/lrz.c | ||
| 100 | @@ -41,12 +41,6 @@ | ||
| 101 | #include "xstrtoul.h" | ||
| 102 | #include "error.h" | ||
| 103 | |||
| 104 | -#ifndef STRICT_PROTOTYPES | ||
| 105 | -extern time_t time(); | ||
| 106 | -extern char *strerror(); | ||
| 107 | -extern char *strstr(); | ||
| 108 | -#endif | ||
| 109 | - | ||
| 110 | #ifndef HAVE_ERRNO_DECLARATION | ||
| 111 | extern int errno; | ||
| 112 | #endif | ||
| 113 | @@ -191,7 +185,7 @@ int enable_syslog=FALSE; | ||
| 114 | |||
| 115 | |||
| 116 | /* called by signal interrupt or terminate to clean things up */ | ||
| 117 | -RETSIGTYPE | ||
| 118 | +void | ||
| 119 | bibi(int n) | ||
| 120 | { | ||
| 121 | if (zmodem_requested) | ||
| 122 | diff --git a/src/lsz.c b/src/lsz.c | ||
| 123 | index e9e4660..69f4fb8 100644 | ||
| 124 | --- a/src/lsz.c | ||
| 125 | +++ b/src/lsz.c | ||
| 126 | @@ -50,12 +50,6 @@ void *mm_addr=NULL; | ||
| 127 | #include "xstrtoul.h" | ||
| 128 | #include "error.h" | ||
| 129 | |||
| 130 | -#ifndef STRICT_PROTOTYPES | ||
| 131 | -extern time_t time(); | ||
| 132 | -extern char *strerror(); | ||
| 133 | -extern char *strstr(); | ||
| 134 | -#endif | ||
| 135 | - | ||
| 136 | #ifndef HAVE_ERRNO_DECLARATION | ||
| 137 | extern int errno; | ||
| 138 | #endif | ||
| 139 | @@ -218,7 +212,7 @@ static int zrqinits_sent=0; | ||
| 140 | static int play_with_sigint=0; | ||
| 141 | |||
| 142 | /* called by signal interrupt or terminate to clean things up */ | ||
| 143 | -RETSIGTYPE | ||
| 144 | +void | ||
| 145 | bibi (int n) | ||
| 146 | { | ||
| 147 | canit(STDOUT_FILENO); | ||
| 148 | diff --git a/src/tcp.c b/src/tcp.c | ||
| 149 | index 137f94c..a885d5b 100644 | ||
| 150 | --- a/src/tcp.c | ||
| 151 | +++ b/src/tcp.c | ||
| 152 | @@ -38,7 +38,7 @@ | ||
| 153 | #include <stdlib.h> | ||
| 154 | #include "error.h" | ||
| 155 | |||
| 156 | -static RETSIGTYPE | ||
| 157 | +static void | ||
| 158 | tcp_alarm_handler(int dummy LRZSZ_ATTRIB_UNUSED) | ||
| 159 | { | ||
| 160 | /* doesn't need to do anything */ | ||
| 161 | diff --git a/src/zglobal.h b/src/zglobal.h | ||
| 162 | index 573b461..55bd58f 100644 | ||
| 163 | --- a/src/zglobal.h | ||
| 164 | +++ b/src/zglobal.h | ||
| 165 | @@ -357,7 +357,7 @@ extern int no_timeout; | ||
| 166 | extern int Zctlesc; /* Encode control characters */ | ||
| 167 | extern int under_rsh; | ||
| 168 | |||
| 169 | -RETSIGTYPE bibi __P ((int n)); | ||
| 170 | +void bibi __P ((int n)); | ||
| 171 | |||
| 172 | #define sendline(c) putchar((c) & 0377) | ||
| 173 | #define xsendline(c) putchar(c) | ||
| 174 | diff --git a/src/zreadline.c b/src/zreadline.c | ||
| 175 | index aeda95c..c8f8263 100644 | ||
| 176 | --- a/src/zreadline.c | ||
| 177 | +++ b/src/zreadline.c | ||
| 178 | @@ -43,7 +43,7 @@ static char *readline_buffer; | ||
| 179 | int readline_left=0; | ||
| 180 | char *readline_ptr; | ||
| 181 | |||
| 182 | -static RETSIGTYPE | ||
| 183 | +static void | ||
| 184 | zreadline_alarm_handler(int dummy LRZSZ_ATTRIB_UNUSED) | ||
| 185 | { | ||
| 186 | /* doesn't need to do anything */ | ||
diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb index b487313e91..777560bd22 100644 --- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb +++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | |||
| @@ -19,6 +19,7 @@ SRC_URI = "https://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ | |||
| 19 | file://cve-2018-10195.patch \ | 19 | file://cve-2018-10195.patch \ |
| 20 | file://include.patch \ | 20 | file://include.patch \ |
| 21 | file://0001-Fix-cross-compilation-using-autoconf-detected-AR.patch \ | 21 | file://0001-Fix-cross-compilation-using-autoconf-detected-AR.patch \ |
| 22 | file://0001-Fix-build-with-GCC-15.patch \ | ||
| 22 | " | 23 | " |
| 23 | SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1" | 24 | SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1" |
| 24 | 25 | ||
