From a5116edbc7b056a2756e4e1ca3fbfc696e05df43 Mon Sep 17 00:00:00 2001 From: Brands Helge Date: Mon, 26 Oct 2015 11:33:50 +0100 Subject: [PATCH] define attribute / int len --- asprintf.c | 4 ++-- asprintf.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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