[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] netbsd: build fix with gcc 4.5



# HG changeset patch
# User David Brownlee <abs@xxxxxxxxxx>
# Date 1325778688 0
# Node ID aaad6a035efb0fcd2d3d7a7320ce9b8ead0ba163
# Parent  03781de56c31072266fb464e7dfeec133bcf0fb4
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@xxxxxxx>
From: David Brownlee <abs@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 03781de56c31 -r aaad6a035efb xen/include/xen/stdarg.h
--- a/xen/include/xen/stdarg.h  Thu Jan 05 15:47:16 2012 +0000
+++ b/xen/include/xen/stdarg.h  Thu Jan 05 15:51:28 2012 +0000
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.