blob: 5dd3748f5e6d27988b8e6624fb098551d3e43b5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
glibc-2.8 no loner provides the ARG_MAX macro.
--- tnftp-20091122/libnetbsd/glob.c
+++ tnftp-20091122/libnetbsd/glob.c
@@ -55,6 +55,8 @@
* Number of matches in the current invocation of glob.
*/
+#include <unistd.h>
+
#include "tnftp.h"
#undef TILDE /* XXX: AIX 4.1.5 has this in <sys/ioctl.h> */
@@ -720,7 +722,7 @@
}
pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
- if ((pglob->gl_flags & GLOB_LIMIT) && (newsize + *limit) >= ARG_MAX) {
+ if ((pglob->gl_flags & GLOB_LIMIT) && (newsize + *limit) >= sysconf(_SC_ARG_MAX)) {
errno = 0;
return(GLOB_NOSPACE);
}
|