http://bugs.gentoo.org/attachment.cgi?id=156739 diff -ur netkit-ftp-0.17/ftp/glob.c netkit-ftp-0.17-mod/ftp/glob.c --- netkit-ftp-0.17/ftp/glob.c 1999-10-02 15:25:23.000000000 +0200 +++ netkit-ftp-0.17-mod/ftp/glob.c 2008-06-14 14:29:57.000000000 +0200 @@ -50,10 +50,18 @@ #include #include #include +#include #include "ftp_var.h" /* for protos only */ #include "glob.h" +#if defined(_SC_ARG_MAX) +# if defined(ARG_MAX) +# undef ARG_MAX +# endif +# define ARG_MAX sysconf (_SC_ARG_MAX) +#endif + #define QUOTE 0200 #define TRIM 0177 #define eq(a,b) (strcmp(a, b)==0)