diff --git a/sys/amd64/include/varargs.h b/sys/amd64/include/varargs.h index 8f167739bb83..b213d88327af 100644 --- a/sys/amd64/include/varargs.h +++ b/sys/amd64/include/varargs.h @@ -44,7 +44,12 @@ typedef char *va_list; -#define va_dcl int va_alist; +#ifdef __GNUC__ +#define va_alist __builtin_va_alist +#define va_dcl int va_alist; ... +#else /* !__GNUC__ */ +#define va_dcl int va_alist; +#endif #define va_start(ap) \ ap = (char *)&va_alist diff --git a/sys/i386/include/varargs.h b/sys/i386/include/varargs.h index 8f167739bb83..b213d88327af 100644 --- a/sys/i386/include/varargs.h +++ b/sys/i386/include/varargs.h @@ -44,7 +44,12 @@ typedef char *va_list; -#define va_dcl int va_alist; +#ifdef __GNUC__ +#define va_alist __builtin_va_alist +#define va_dcl int va_alist; ... +#else /* !__GNUC__ */ +#define va_dcl int va_alist; +#endif #define va_start(ap) \ ap = (char *)&va_alist