]> err.no Git - varnish/commitdiff
My idiocy knows no bounds. Make sure this actually builds.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Aug 2006 15:51:32 +0000 (15:51 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Aug 2006 15:51:32 +0000 (15:51 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@724 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/include/compat.h
varnish-cache/lib/libcompat/vasprintf.c

index 1e52a9907e86695e2efce0548f3cb28149768ffc..c6ff735e2c0246f479a8fa7c224d5357dd566f29 100644 (file)
@@ -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
index 41ac20e7fa8cf01bd8b0af36e530801e54758adf..08fd699248630b4be1e6aac5693557fc900470ad 100644 (file)
@@ -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);