diff -ur ftp/glob.c ftp/glob.c
--- ftp/glob.c	1999-10-02 15:25:23.000000000 +0200
+++ ftp/glob.c	2008-06-14 14:29:57.000000000 +0200
@@ -50,10 +50,18 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #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)

