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