From f21d3975ad41dd2c9230386d4b223994c3e6107d Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 22 May 2026 18:29:32 +0000 Subject: [PATCH] xarchive: fix build with llvm22: getline() takes a size_t *, not an int * --- x11/xarchive/Makefile | 2 +- x11/xarchive/patches/patch-src_main_c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/x11/xarchive/Makefile b/x11/xarchive/Makefile index bb3d6315bb7..29447c669af 100644 --- a/x11/xarchive/Makefile +++ b/x11/xarchive/Makefile @@ -3,7 +3,7 @@ COMMENT= GTK+2 front-end for command line archiving tools V= 0.2.8-6 DISTNAME= xarchive-$V PKGNAME= xarchive-${V:S/-/./} -REVISION= 10 +REVISION= 11 CATEGORIES= x11 HOMEPAGE= https://xarchive.sourceforge.net/ diff --git a/x11/xarchive/patches/patch-src_main_c b/x11/xarchive/patches/patch-src_main_c index e52d95ace4f..9fde4f1ba7d 100644 --- a/x11/xarchive/patches/patch-src_main_c +++ b/x11/xarchive/patches/patch-src_main_c @@ -10,6 +10,15 @@ Index: src/main.c return name; } #endif +@@ -55,7 +55,7 @@ getline(char **lineptr, size_t *n, FILE *stream) + void + setup_exts(WrapperEntry *wrapent) + { +- int maxline=MAXLINE; ++ size_t maxline=MAXLINE; + gchar *dataline = (gchar *) g_malloc (MAXLINE + 1); + gchar *cmd, *extname; + FILE *fdata; @@ -63,7 +63,7 @@ setup_exts(WrapperEntry *wrapent) GPtrArray *ext_array = NULL; @@ -19,3 +28,13 @@ Index: src/main.c fdata = popen(cmd, "r"); if (getline(&dataline, &maxline, fdata) > 0) { +@@ -216,7 +216,8 @@ get_archive_data(gchar **argv) + * sending each line to the widgets add_row function */ + enum {name=0,size,attr,user,group,date,time,link,num_ent}; + FILE *fdata; +- gint cnt, maxline=MAXLINE, i = 20, error = 0; ++ size_t maxline=MAXLINE; ++ gint cnt, i = 20, error = 0; + gchar *ent[num_ent], *esc_archive; + gchar *dataline = (gchar *) g_malloc (MAXLINE + 1); + gchar delimit[]=";\n";