blob: 5a47fd9175ebaf9efe96235f4844d343f34af40b [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001This adds ARG_MAX define to be _SC_ARG_MAX
2
3Upstream-Status: Inappropriate.
4Most distros have their own verion for this fix.
5
6Signed-off-by: Armin Kuster <akuster808@gmail.com>
7
8Index: netkit-ftp-0.17/ftp/glob.c
9===================================================================
10--- netkit-ftp-0.17.orig/ftp/glob.c
11+++ netkit-ftp-0.17/ftp/glob.c
12@@ -50,6 +50,7 @@ char glob_rcsid[] =
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
16+#include <unistd.h>
17
18 #include "ftp_var.h" /* for protos only */
19 #include "glob.h"
20@@ -57,6 +58,9 @@ char glob_rcsid[] =
21 #define QUOTE 0200
22 #define TRIM 0177
23 #define eq(a,b) (strcmp(a, b)==0)
24+#ifndef ARG_MAX
25+#define ARG_MAX (sysconf(_SC_ARG_MAX))
26+#endif
27 #define GAVSIZ (ARG_MAX/6)
28 #define isdir(d) ((d.st_mode & S_IFMT) == S_IFDIR)