diff options
author | David Brownlee <abs@netbsd.org> | 2012-01-05 15:51:28 +0000 |
---|---|---|
committer | David Brownlee <abs@netbsd.org> | 2012-01-05 15:51:28 +0000 |
commit | fca49a00fd723ba664e7b063ccf4ab9810596e78 (patch) | |
tree | 0e259b67ad02552fd398f625b4467b25ea8da247 /xen/include/xen/stdarg.h | |
parent | c5a6b9776b4387d14ae068d9a269f2c8518076dc (diff) | |
download | xen-fca49a00fd723ba664e7b063ccf4ab9810596e78.tar.gz xen-fca49a00fd723ba664e7b063ccf4ab9810596e78.tar.bz2 xen-fca49a00fd723ba664e7b063ccf4ab9810596e78.zip |
netbsd: build fix with gcc 4.5
Fix build failure with gcc 4.5:
implicit declaration of __builtin_stdarg_start
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
From: David Brownlee <abs@netbsd.org>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/stdarg.h')
-rw-r--r-- | xen/include/xen/stdarg.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h index 57e2c0e3bf..8d9de51714 100644 --- a/xen/include/xen/stdarg.h +++ b/xen/include/xen/stdarg.h @@ -5,7 +5,17 @@ # include "/usr/include/stdarg.h" #elif defined (__NetBSD__) typedef __builtin_va_list va_list; -# define va_start(ap, last) __builtin_stdarg_start((ap), (last)) +# ifdef __GNUC__ +# define __GNUC_PREREQ__(x, y) \ + ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ + (__GNUC__ > (x))) +# else +# define __GNUC_PREREQ__(x, y) 0 +# endif +# if !__GNUC_PREREQ__(4, 5) +# define __builtin_va_start(ap, last) __builtin_stdarg_start((ap), (last)) +# endif +# define va_start(ap, last) __builtin_va_start((ap), (last)) # define va_end(ap) __builtin_va_end(ap) # define va_arg __builtin_va_arg #else |