From: Christoph Egger <Christoph.Egger@amd.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] xen: build fix with gcc 4.5
Date: Thu, 5 Jan 2012 16:48:11 +0100 [thread overview]
Message-ID: <4F05C63B.8030409@amd.com> (raw)
In-Reply-To: <4F05C1FC.2090803@amd.com>
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Fix build failure with gcc 4.5 on NetBSD:
implicit declaration of __builtin_stdarg_start
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
From: David Brownlee <abs@netbsd.org>
Please also apply this to xen-4.1-testing.
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_stdarg.diff --]
[-- Type: text/plain, Size: 914 bytes --]
diff -r 9a84303b600c xen/include/xen/stdarg.h
--- a/xen/include/xen/stdarg.h Thu Jan 05 14:46:28 2012 +0100
+++ b/xen/include/xen/stdarg.h Thu Jan 05 16:15:47 2012 +0100
@@ -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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2012-01-05 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 15:30 [PATCH] xen: build fix with gcc 4.5 Christoph Egger
2012-01-05 15:39 ` Keir Fraser
2012-01-05 15:48 ` Christoph Egger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F05C63B.8030409@amd.com \
--to=christoph.egger@amd.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.