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>
This commit is contained in:
David Brownlee committed 2012-01-05 15:51:28 +00:00
1 parent c5a6b9776b
commit fca49a00fd
1 file changed
+11 -1
+11 -1
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.