diff -r 24b01e02ea17 xen/common/libelf/libelf-loader.c --- a/xen/common/libelf/libelf-loader.c Thu May 26 11:34:49 2011 +0200 +++ b/xen/common/libelf/libelf-loader.c Thu May 26 16:45:38 2011 +0200 @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include "../../include/xen/stdarg.h" #include "libelf-private.h" diff -r 24b01e02ea17 xen/include/xen/stdarg.h --- a/xen/include/xen/stdarg.h Thu May 26 11:34:49 2011 +0200 +++ b/xen/include/xen/stdarg.h Thu May 26 16:45:38 2011 +0200 @@ -1,5 +1,13 @@ -#if defined(__OpenBSD__) -# include "/usr/include/stdarg.h" +#ifndef _XEN_STDARG_H_ +#define _XEN_STDARG_H_ + +#if defined(__XEN__) +typedef __builtin_va_list va_list; +#define va_start(ap, last) __builtin_stdarg_start((ap), (last)) +#define va_end(ap) __builtin_va_end(ap) +#define va_arg __builtin_va_arg #else # include #endif + +#endif /* _XEN_STDARG_H_ */