[Nagiosplug-devel] aix 5.2 patch for nagios-plugins-1.4.0alpha1... again

Eric Lauriault ELauri at lacitec.on.ca
Sun Jun 6 08:15:02 CEST 2004


Hi,

It seems like my previous post didn't contain the patch. Here it is :


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