- protect Xen's stdarg.h from multiple inclusion.

- build fix for stdarg under NetBSD.

Both backported from upstream. Seems to be needed to build pkg under 5.99.x

http://xenbits.xensource.com/hg/xen-unstable.hg/file/a574bf2f5059/xen/include/xen/stdarg.h
This commit is contained in:
jym 2011-07-19 18:53:53 +00:00
parent 657a70c77f
commit e6f97c2cc5
2 changed files with 27 additions and 1 deletions

View file

@ -1,10 +1,11 @@
$NetBSD: distinfo,v 1.13 2011/03/24 12:43:53 drochner Exp $
$NetBSD: distinfo,v 1.14 2011/07/19 18:53:53 jym Exp $
SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d
RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859
Size (xen-3.1.4.tar.gz) = 6894493 bytes
SHA1 (patch-aa) = 1be644e7edd3735c2850d3e581002f53bd50eb59
SHA1 (patch-ac) = 4c237984832ef5532e0451845e8075b95744e48d
SHA1 (patch-ae) = 37b1c8d6cc66983d971fe41654cc8cefde87104a
SHA1 (patch-ba) = cadfa6f2626e95c9ccb85ae7e3a8a7f318ea343f
SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94
SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844

View file

@ -0,0 +1,25 @@
$NetBSD: patch-ae,v 1.3 2011/07/19 18:53:54 jym Exp $
- protect Xen's stdarg.h from multiple inclusion.
- build fix for stdarg under NetBSD.
Both backported from upstream.
http://xenbits.xensource.com/hg/xen-unstable.hg/file/a574bf2f5059/xen/include/xen/stdarg.h
--- xen/include/xen/stdarg.h.orig 2009-08-06 12:56:43.000000000 +0000
+++ xen/include/xen/stdarg.h
@@ -1,5 +1,15 @@
+#ifndef __XEN_STDARG_H__
+#define __XEN_STDARG_H__
+
#if defined(__OpenBSD__)
# include "/usr/include/stdarg.h"
+#elif defined (__NetBSD__)
+ typedef __builtin_va_list va_list;
+# define va_start(ap, last) __builtin_stdarg_start((ap), (last))
+# define va_end(ap) __builtin_va_end(ap)
+# define va_arg __builtin_va_arg
#else
# include <stdarg.h>
#endif
+
+#endif /* __XEN_STDARG_H__ */