summaryrefslogtreecommitdiff
path: root/app-shells/rc/files/rc-1.7.4-libedit.patch
diff options
context:
space:
mode:
authorNHOrus <jy6x2b32pie9@yahoo.com>2025-01-05 21:50:47 +0400
committerSam James <sam@gentoo.org>2025-02-10 09:19:40 +0000
commita4bfadcafd63d5e30a4fa4dc2c6457241f826835 (patch)
tree6c86d0a2ff68074288dc374860527e289830ae19 /app-shells/rc/files/rc-1.7.4-libedit.patch
parent20321133e4eecf54a935b91ab5ede61bf5b4e5e8 (diff)
downloadgentoo-a4bfadcafd63d5e30a4fa4dc2c6457241f826835.tar.gz
gentoo-a4bfadcafd63d5e30a4fa4dc2c6457241f826835.tar.bz2
gentoo-a4bfadcafd63d5e30a4fa4dc2c6457241f826835.zip
app-shells/rc: fix build failure, port to C23 For libedit, we need to carefully truncate size_t to int but that's number of lines, so it should work in sane situations
C23 porting is limited to autoreconf and dealing with bool defines Code is not bit-rotten too much Bug: https://bugs.gentoo.org/925558 Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/39989 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-shells/rc/files/rc-1.7.4-libedit.patch')
-rw-r--r--app-shells/rc/files/rc-1.7.4-libedit.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/app-shells/rc/files/rc-1.7.4-libedit.patch b/app-shells/rc/files/rc-1.7.4-libedit.patch
new file mode 100644
index 000000000000..14ab77d18069
--- /dev/null
+++ b/app-shells/rc/files/rc-1.7.4-libedit.patch
@@ -0,0 +1,17 @@
+bug https://bugs.gentoo.org/925558
+truncating number of lines from long uint to int and hoping
+for the best, due to API mismatch
+diff -ru a/edit-edit.c b/edit-edit.c
+--- a/edit-edit.c 2025-01-05 20:59:08.759555902 +0400
++++ b/edit-edit.c 2025-01-05 21:01:03.040010129 +0400
+@@ -50,8 +50,8 @@
+
+ oldint = sys_signal(SIGINT, edit_catcher);
+ oldquit = sys_signal(SIGQUIT, edit_catcher);
+-
+- r = el_gets(c->el, count);
++ int trunc_count = *count;
++ r = el_gets(c->el, &trunc_count);
+
+ sys_signal(SIGINT, oldint);
+ sys_signal(SIGQUIT, oldquit);