From 683a2157cc39b2dab04a18359d0df120b93a0d41 Mon Sep 17 00:00:00 2001 From: Phil Knirsch Date: Tue, 29 Jul 2008 12:11:20 +0000 Subject: [PATCH] - Hopefully final fix for the ARG_MAX problem. --- freeipmi-0.6.4-argmax.patch | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/freeipmi-0.6.4-argmax.patch b/freeipmi-0.6.4-argmax.patch index 71288c0..0671a3f 100644 --- a/freeipmi-0.6.4-argmax.patch +++ b/freeipmi-0.6.4-argmax.patch @@ -1,17 +1,14 @@ diff -up freeipmi-0.6.4/libfreeipmi/include/freeipmi/freeipmi.h.argmax freeipmi-0.6.4/libfreeipmi/include/freeipmi/freeipmi.h ---- freeipmi-0.6.4/libfreeipmi/include/freeipmi/freeipmi.h.argmax 2008-07-29 13:26:05.000000000 +0200 -+++ freeipmi-0.6.4/libfreeipmi/include/freeipmi/freeipmi.h 2008-07-29 13:30:16.000000000 +0200 -@@ -23,6 +23,15 @@ +--- freeipmi-0.6.4/libfreeipmi/include/freeipmi/freeipmi.h.argmax 2008-03-28 01:14:49.000000000 +0100 ++++ freeipmi-0.6.4/libfreeipmi/include/freeipmi/freeipmi.h 2008-07-29 14:00:21.000000000 +0200 +@@ -23,6 +23,12 @@ extern "C" { #endif -+/* GLIBC >= 2.8 have ARG_MAX replaced by _SC_ARG_MAX */ -+#include -+#ifdef _SC_ARG_MAX -+#ifdef ARG_MAX -+#undef ARG_MAX -+#endif -+#define ARG_MAX sysconf(_SC_ARG_MAX) ++/* GLIBC >= 2.8 have ARG_MAX replaced by _SC_ARG_MAX. As we need it in an ++ * array we need to hardwire it with the Posix.1 minimum of 4096 :/ */ ++#ifndef ARG_MAX ++#define ARG_MAX 4096 +#endif + #include