diff --git a/xmalloc.c b/xmalloc.c index 28af50f9..9e305061 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -71,7 +71,7 @@ xvasprintf_(char **strp, const char *format, va_list ap) return vsnprintf(*strp, n + 1, format, ap); } -static VPRINTF(1) char * +char * xvasprintf(const char *format, va_list ap) { char *str; diff --git a/xmalloc.h b/xmalloc.h index 13d69ca4..bc0dd2d8 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include "macros.h" @@ -10,4 +11,5 @@ void *xrealloc(void *ptr, size_t size); char *xstrdup(const char *str) XSTRDUP; char *xstrndup(const char *str, size_t n) XSTRDUP; char *xasprintf(const char *format, ...) PRINTF(1) XMALLOC; +char *xvasprintf(const char *format, va_list va) VPRINTF(1) XMALLOC; wchar_t *xwcsdup(const wchar_t *str) XSTRDUP;