diff --git a/clang/lib/Headers/stdarg.h b/clang/lib/Headers/stdarg.h --- a/clang/lib/Headers/stdarg.h +++ b/clang/lib/Headers/stdarg.h @@ -8,7 +8,17 @@ */ #ifndef __STDARG_H +#ifndef __need___va_list #define __STDARG_H +#endif /* __need___va_list */ +#undef __need___va_list + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST 1 +typedef __builtin_va_list __gnuc_va_list; +#endif + +#ifdef __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; @@ -29,9 +39,6 @@ #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST 1 -typedef __builtin_va_list __gnuc_va_list; -#endif - #endif /* __STDARG_H */ + +#endif /* not __STDARG_H */ diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include