Blame fish-1.23.0-ARG_MAX.patch

Andy Lutomirski b1dfe6
diff -up fish-1.23.0/exec.c.BAD fish-1.23.0/exec.c
Andy Lutomirski b1dfe6
--- fish-1.23.0/exec.c.BAD	2008-09-15 16:28:52.000000000 -0400
Andy Lutomirski b1dfe6
+++ fish-1.23.0/exec.c	2008-09-15 16:29:56.000000000 -0400
Andy Lutomirski b1dfe6
@@ -24,6 +24,14 @@
Andy Lutomirski b1dfe6
 #include <dirent.h>
Andy Lutomirski b1dfe6
 #include <time.h>
Andy Lutomirski b1dfe6
 
Andy Lutomirski b1dfe6
+#if defined(_SC_ARG_MAX)
Andy Lutomirski b1dfe6
+# if defined(ARG_MAX)
Andy Lutomirski b1dfe6
+#  undef ARG_MAX
Andy Lutomirski b1dfe6
+# endif
Andy Lutomirski b1dfe6
+# define ARG_MAX sysconf (_SC_ARG_MAX)
Andy Lutomirski b1dfe6
+#endif
Andy Lutomirski b1dfe6
+
Andy Lutomirski b1dfe6
+
Andy Lutomirski b1dfe6
 #ifdef HAVE_SIGINFO_H
Andy Lutomirski b1dfe6
 #include <siginfo.h>
Andy Lutomirski b1dfe6
 #endif