r724 - in trunk/varnish-cache: include lib/libcompat

des at projects.linpro.no des at projects.linpro.no
Mon Aug 7 17:51:32 CEST 2006


Author: des
Date: 2006-08-07 17:51:32 +0200 (Mon, 07 Aug 2006)
New Revision: 724

Modified:
   trunk/varnish-cache/include/compat.h
   trunk/varnish-cache/lib/libcompat/vasprintf.c
Log:
My idiocy knows no bounds.  Make sure this actually builds.

Modified: trunk/varnish-cache/include/compat.h
===================================================================
--- trunk/varnish-cache/include/compat.h	2006-08-07 15:47:39 UTC (rev 723)
+++ trunk/varnish-cache/include/compat.h	2006-08-07 15:51:32 UTC (rev 724)
@@ -6,11 +6,13 @@
 #define COMPAT_H_INCLUDED
 
 #ifndef HAVE_VASPRINTF
-int vasprintf(char **strp, const char *fmt, va_list ap)
+#ifdef va_start /* make sure <stdarg.h> is in scope */
+int vasprintf(char **strp, const char *fmt, va_list ap);
 #endif
+#endif
 
 #ifndef HAVE_ASPRINTF
-int asprintf(char **strp, const char *fmt, ...)
+int asprintf(char **strp, const char *fmt, ...);
 #endif
 
 #ifndef HAVE_STRLCPY

Modified: trunk/varnish-cache/lib/libcompat/vasprintf.c
===================================================================
--- trunk/varnish-cache/lib/libcompat/vasprintf.c	2006-08-07 15:47:39 UTC (rev 723)
+++ trunk/varnish-cache/lib/libcompat/vasprintf.c	2006-08-07 15:51:32 UTC (rev 724)
@@ -5,14 +5,15 @@
 
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "compat.h"
 
 #ifndef HAVE_VASPRINTF
 int
-asprintf(char **strp, const char *fmt, va_list ap)
+vasprintf(char **strp, const char *fmt, va_list ap)
 {
-	va_list ap, aq;
+	va_list aq;
 	int ret;
 
 	va_copy(aq, ap);




More information about the varnish-commit mailing list