xarchive: fix build with llvm22: getline() takes a size_t *, not an int *

This commit is contained in:
tb
2026-05-22 18:29:32 +00:00
parent cecbf10bf1
commit f21d3975ad
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -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/
+19
View File
@@ -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";