diff --git a/meta/recipes-extended/gawk/gawk/0001-Fix-some-C23-compilatio-issues.patch b/meta/recipes-extended/gawk/gawk/0001-Fix-some-C23-compilatio-issues.patch new file mode 100644 index 0000000000..7082e62beb --- /dev/null +++ b/meta/recipes-extended/gawk/gawk/0001-Fix-some-C23-compilatio-issues.patch @@ -0,0 +1,35 @@ +From e4015d209ddc31bd1256fa568612372407e0b9c5 Mon Sep 17 00:00:00 2001 +From: Arnold D. Robbins +Date: Mon, 12 Aug 2024 06:33:28 +0300 +Subject: [PATCH] Fix some C23 compilatio issues. + + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gawk.git/commit/?id=7a521fe4b37f8554ca53ef3236f0352e391aaa1d (in v5.3.1)] +Backport: Only kept the code change, dropped comment changes +Signed-off-by: Yoann Congal +--- + io.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/io.c b/io.c +index c595c009e..44671ebd1 100644 +--- a/io.c ++++ b/io.c +@@ -3386,7 +3386,7 @@ iop_alloc(int fd, const char *name, int errno_val) + + iop->public.fd = fd; + iop->public.name = name; +- iop->public.read_func = ( ssize_t(*)() ) read; ++ iop->public.read_func = ( ssize_t(*)(int, void *, size_t) ) read; + iop->valid = false; + iop->errcode = errno_val; + +@@ -4446,7 +4446,7 @@ get_read_timeout(IOBUF *iop) + tmout = read_default_timeout; /* initialized from env. variable in init_io() */ + + /* overwrite read routine only if an extension has not done so */ +- if ((iop->public.read_func == ( ssize_t(*)() ) read) && tmout > 0) ++ if ((iop->public.read_func == ( ssize_t(*)(int, void *, size_t) ) read) && tmout > 0) + iop->public.read_func = read_with_timeout; + + return tmout; diff --git a/meta/recipes-extended/gawk/gawk_5.3.0.bb b/meta/recipes-extended/gawk/gawk_5.3.0.bb index e38c1f8436..b1d1fe7ae4 100644 --- a/meta/recipes-extended/gawk/gawk_5.3.0.bb +++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb @@ -21,6 +21,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ file://0001-m4-readline-add-missing-includes.patch \ file://run-ptest \ + file://0001-Fix-some-C23-compilatio-issues.patch \ " SRC_URI[sha256sum] = "378f8864ec21cfceaa048f7e1869ac9b4597b449087caf1eb55e440d30273336"