diff options
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/stdarg.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h index ddf7c81c083..204fd1cca87 100644 --- a/sys/arch/i386/include/stdarg.h +++ b/sys/arch/i386/include/stdarg.h @@ -45,8 +45,13 @@ typedef _BSD_VA_LIST_ va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) +#ifdef __GNUC__ +#define va_start(ap, last) \ + ((ap) = (va_list)__builtin_next_arg(last)) +#else #define va_start(ap, last) \ ((ap) = (va_list)&(last) + __va_size(last)) +#endif #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) |