[Nagiosplug-devel] Re: AIx 5.2 and nagios-plugins

Eric Lauriault elauri at lacitec.on.ca
Fri Nov 12 07:23:03 CET 2004


Hi Trevor,

I guess the patch wasn't attached to the original posting. The error msg
seem similar to what I was getting if I remember correctly. You might
want to know this wasn't tested on AIX 5.2/32 only on AIX5.2/64. I've
been using it in a production environment on 2 boxes and it works for
me. Hope this helps.

diff -Paru nagios-plugins-1.4.0alpha1-orig/lib/mountlist.c
nagios-plugins-1.4.0alpha1/lib/mountlist.c
--- nagios-plugins-1.4.0alpha1-orig/lib/mountlist.c     2003-10-29
21:18:12.000000000 -0500
+++ nagios-plugins-1.4.0alpha1/lib/mountlist.c  2004-05-27
15:35:46.000000000 -0400
@@ -719,7 +719,7 @@
    /* Get the list of mounted filesystems.  */
    mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries);

-    for (thisent = entries; thisent < entries + bufsize;
+    for (thisent = entries; thisent < entries + bufsize && ((struct
vmount *) thisent)->vmt_length;
        thisent += vmp->vmt_length)
      {
       char *options, *ignore;
diff -Paru nagios-plugins-1.4.0alpha1-orig/lib/snprintf.c
nagios-plugins-1.4.0alpha1/lib/snprintf.c
--- nagios-plugins-1.4.0alpha1-orig/lib/snprintf.c      2003-03-07
20:59:30.000000000 -0500
+++ nagios-plugins-1.4.0alpha1/lib/snprintf.c   2004-05-27
15:30:53.000000000 -0400
@@ -85,6 +85,14 @@
#include <stdlib.h>
#endif

+#ifndef VA_COPY
+#ifdef HAVE_VA_COPY
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#else
+#define VA_COPY(dest, src) (dest) = (src)
+#endif
+#endif
+
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) &&
defined(HAVE_C99_VSNPRINTF)
/* only include stdio.h if we are not re-defining snprintf or vsnprintf
*/
#include <stdio.h>
@@ -109,13 +117,6 @@
#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} }
while(0)
#endif

-#ifndef VA_COPY
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) __va_copy(dest, src)
-#else
-#define VA_COPY(dest, src) (dest) = (src)
-#endif
-#endif

static size_t dopr(char *buffer, size_t maxlen, const char *format,
                  va_list args_in);




Eric Lauriault, eric at lacitec.on.ca
Analyste/Administrateur UNIX/telecom/reseau
La Cite collegiale




More information about the Devel mailing list