mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-13 06:23:45 -04:00
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
$NetBSD: patch-ae,v 1.4 2014/05/14 20:21:19 bouyer 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 2008-04-25 15:03:12.000000000 +0200
|
|
+++ xen/include/xen/stdarg.h 2014-05-14 16:11:10.000000000 +0200
|
|
@@ -1,5 +1,26 @@
|
|
+#ifndef __XEN_STDARG_H__
|
|
+#define __XEN_STDARG_H__
|
|
+
|
|
#if defined(__OpenBSD__)
|
|
# include "/usr/include/stdarg.h"
|
|
+#elif defined (__NetBSD__)
|
|
+#ifdef __GNUC__
|
|
+#define __GNUC_PREREQ__(x, y) \
|
|
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
|
|
+ (__GNUC__ > (x)))
|
|
+#else
|
|
+#define __GNUC_PREREQ__(x, y) 0
|
|
+#endif
|
|
+ typedef __builtin_va_list va_list;
|
|
+#if __GNUC_PREREQ__(4, 5)
|
|
+# define va_start(ap, last) __builtin_va_start((ap), (last))
|
|
+#else
|
|
+# define va_start(ap, last) __builtin_stdarg_start((ap), (last))
|
|
+#endif /* __GNUC_PREREQ__ */
|
|
+# define va_end(ap) __builtin_va_end(ap)
|
|
+# define va_arg __builtin_va_arg
|
|
#else
|
|
# include <stdarg.h>
|
|
#endif
|
|
+
|
|
+#endif /* __XEN_STDARG_H__ */
|