Sun Aug 14 20:42:41 2011 UTC ()
Fix build with gcc 4.5.3 under NetBSD


(abs)
diff -r1.4 -r1.5 pkgsrc/sysutils/xenkernel41/distinfo
diff -r0 -r1.3 pkgsrc/sysutils/xenkernel41/patches/patch-xen_include_xen_stdarg.h

cvs diff -r1.4 -r1.5 pkgsrc/sysutils/xenkernel41/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/xenkernel41/Attic/distinfo 2011/06/16 13:02:50 1.4
+++ pkgsrc/sysutils/xenkernel41/Attic/distinfo 2011/08/14 20:42:40 1.5
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
1$NetBSD: distinfo,v 1.4 2011/06/16 13:02:50 cegger Exp $ 1$NetBSD: distinfo,v 1.5 2011/08/14 20:42:40 abs Exp $
2 2
3SHA1 (xen-4.1.1.tar.gz) = f1b5ef4b663c339faf9c77fc895327cfbcc9776c 3SHA1 (xen-4.1.1.tar.gz) = f1b5ef4b663c339faf9c77fc895327cfbcc9776c
4RMD160 (xen-4.1.1.tar.gz) = 4b3c0641b0f098889f627662aa6b8fea00c5b636 4RMD160 (xen-4.1.1.tar.gz) = 4b3c0641b0f098889f627662aa6b8fea00c5b636
5Size (xen-4.1.1.tar.gz) = 10355625 bytes 5Size (xen-4.1.1.tar.gz) = 10355625 bytes
6SHA1 (patch-xen_drivers_char_console_c) = 0fe186369602ccffaeec6f4bfbee8bb4298d3ff0 6SHA1 (patch-xen_drivers_char_console_c) = 0fe186369602ccffaeec6f4bfbee8bb4298d3ff0
 7SHA1 (patch-xen_include_xen_stdarg.h) = e9df974a9b783ed442ab17497198432cb9844b70

File Added: pkgsrc/sysutils/xenkernel41/patches/Attic/patch-xen_include_xen_stdarg.h
$NetBSD: patch-xen_include_xen_stdarg.h,v 1.3 2011/08/14 20:42:41 abs Exp $

--- xen/include/xen/stdarg.h.orig	2011-06-14 16:03:46.000000000 +0000
+++ xen/include/xen/stdarg.h
@@ -1,8 +1,19 @@
 #if defined(__OpenBSD__)
 #  include "/usr/include/stdarg.h"
 #elif defined (__NetBSD__)
+   /* Why not just include stdarg.h like everyone else? should explain */
    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