From: Keir Fraser Date: Fri, 27 May 2011 14:49:24 +0000 (+0100) Subject: Clean up stdarg handling a little. Fix for NetBSD. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10268 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6f338af1e1461e2ebfe0528e7a1b5a5fbe12e8fe;p=xen.git Clean up stdarg handling a little. Fix for NetBSD. Signed-off-by: Keir Fraser --- diff --git a/xen/common/libelf/libelf-loader.c b/xen/common/libelf/libelf-loader.c index 69871e5aed..1ccf7d35a6 100644 --- a/xen/common/libelf/libelf-loader.c +++ b/xen/common/libelf/libelf-loader.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include - #include "libelf-private.h" /* ------------------------------------------------------------------------ */ diff --git a/xen/common/libelf/libelf-private.h b/xen/common/libelf/libelf-private.h index e47ff3b8cd..3ef753c1b3 100644 --- a/xen/common/libelf/libelf-private.h +++ b/xen/common/libelf/libelf-private.h @@ -40,6 +40,7 @@ #else /* !__XEN__ */ +#include #include #include #include diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c index 8fd1ac25de..d9128e1691 100644 --- a/xen/common/vsprintf.c +++ b/xen/common/vsprintf.c @@ -16,7 +16,6 @@ * - scnprintf and vscnprintf */ -#include #include #include #include diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h index 9508bc4df4..f26fa54663 100644 --- a/xen/include/xen/stdarg.h +++ b/xen/include/xen/stdarg.h @@ -1,5 +1,10 @@ #if defined(__OpenBSD__) # include "/usr/include/stdarg.h" +#elif defined (__NetBSD__) + 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