From 4206f5d0893257cff11723482a38ef244a01fa39 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Mon, 22 Jan 2018 12:30:55 -0800 Subject: [PATCH] Add clang placeholders for va_arg_pack --- misc/sys/cdefs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index af103fdb8aa..61deb03df14 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -354,9 +354,14 @@ /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #if __GNUC_PREREQ (4,3) +#if defined(__clang__) +# define __va_arg_pack() __VA_ARGS__ +# define __va_arg_pack_len() 0 +#else # define __va_arg_pack() __builtin_va_arg_pack () # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif +#endif /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the -- 2.47.2