diff --git a/asprintf.c b/asprintf.c index 759dbee..d623bf2 100644 --- a/asprintf.c +++ b/asprintf.c @@ -9,8 +9,8 @@ int vasprintf(char** pbuffer, const char* format, va_list ap) { va_list ap2; - size_t len; - + int len; + #if defined(vxWorks) FILE* f; /* print to null device to get required buffer length */ diff --git a/asprintf.h b/asprintf.h index 7625d11..35514bf 100644 --- a/asprintf.h +++ b/asprintf.h @@ -4,6 +4,10 @@ extern "C" { #endif #include +#ifndef __GNUC__ +#define __attribute__(arg) +#endif + int asprintf(char** pbuffer, const char* format, ...) __attribute__((format(printf,2,3))); int vasprintf(char** pbuffer, const char* format, va_list ap) __attribute__((format(printf,2,0))); #ifdef __cplusplus