diff --git a/network/netkit-ftp/fedora_arg_max.patch b/network/netkit-ftp/fedora_arg_max.patch new file mode 100644 index 000000000..f27b204d4 --- /dev/null +++ b/network/netkit-ftp/fedora_arg_max.patch @@ -0,0 +1,72 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../netkit-ftp/fedora_arg_max.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +diff -up netkit-ftp-0.17/ftp/glob.c.arg_max netkit-ftp-0.17/ftp/glob.c +--- netkit-ftp-0.17/ftp/glob.c.arg_max 2008-04-07 11:41:14.000000000 +0200 ++++ netkit-ftp-0.17/ftp/glob.c 2008-04-07 12:01:53.000000000 +0200 +@@ -50,6 +50,7 @@ char glob_rcsid[] = + #include + #include + #include ++#include + + #include "ftp_var.h" /* for protos only */ + #include "glob.h" +@@ -57,7 +58,7 @@ char glob_rcsid[] = + #define QUOTE 0200 + #define TRIM 0177 + #define eq(a,b) (strcmp(a, b)==0) +-#define GAVSIZ (ARG_MAX/6) ++#define GAVSIZ (sysconf(_SC_ARG_MAX)/6) + #define isdir(d) ((d.st_mode & S_IFMT) == S_IFDIR) + + const char *globerr; +@@ -115,7 +116,7 @@ char ** + ftpglob(const char *v) + { + char agpath[BUFSIZ]; +- entry agargv[GAVSIZ]; ++ entry *agargv; + centry vv[2]; + vv[0].text = v; + vv[1].text = NULL; +@@ -133,6 +134,8 @@ ftpglob(const char *v) + /* added ()'s to sizeof, (ambigious math for the compiler) */ + lastgpathp = agpath + (sizeof(agpath)- 2); + ++ agargv = (entry *)malloc(sizeof (entry) * GAVSIZ); ++ if (agargv == NULL) fatal("Out of memory"); + ginit(agargv); + globcnt = 0; + collect(v); +@@ -156,7 +159,7 @@ ginit(entry *agargv) + gargv = agargv; + sortbas = agargv; + gargc = 0; +- gnleft = ARG_MAX - 4; ++ gnleft = sysconf(_SC_ARG_MAX) - 4; + } + + static +@@ -674,6 +677,7 @@ efree(entry *av) + { + int i; + for (i=0; av[i].text; i++) free(av[i].text); ++ free((void *)av); + } + + static + diff --git a/network/netkit-ftp/netkit-ftp.desc b/network/netkit-ftp/netkit-ftp.desc index d5e8b5b6d..7ed3bb079 100644 --- a/network/netkit-ftp/netkit-ftp.desc +++ b/network/netkit-ftp/netkit-ftp.desc @@ -1,9 +1,8 @@ - [COPY] --- SDE-COPYRIGHT-NOTE-BEGIN --- [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] [COPY] Filename: package/.../netkit-ftp/netkit-ftp.desc -[COPY] Copyright (C) 2006 The OpenSDE Project +[COPY] Copyright (C) 2006 - 2009 The OpenSDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] Copyright (C) 1998 - 2003 Clifford Wolf [COPY] @@ -29,7 +28,6 @@ [L] OpenSource [S] Stable [V] 0.17 -[P] X -----5---9 188.100 +[P] O -----5---9 188.100 [D] 136178471 netkit-ftp-0.17.tar.gz ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ -