From: Jan Kiszka <[email protected]> The kernel stops using the system headers with 5.16, and so should we. Just add two simple headers that map va_* to __builtin_va_*.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/include/jailhouse/stdarg.h | 17 +++++++++++ hypervisor/printk.c | 4 +-- inmates/lib/include/stdarg.h | 43 +++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 hypervisor/include/jailhouse/stdarg.h create mode 100644 inmates/lib/include/stdarg.h diff --git a/hypervisor/include/jailhouse/stdarg.h b/hypervisor/include/jailhouse/stdarg.h new file mode 100644 index 00000000..7c8633d4 --- /dev/null +++ b/hypervisor/include/jailhouse/stdarg.h @@ -0,0 +1,17 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Copyright (c) Siemens AG, 2022 + * + * Authors: + * Jan Kiszka <[email protected]> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + */ + +typedef __builtin_va_list va_list; + +#define va_start(ap, last) __builtin_va_start(ap, last) +#define va_arg(ap, type) __builtin_va_arg(ap, type) +#define va_end(ap) __builtin_va_end(ap) diff --git a/hypervisor/printk.c b/hypervisor/printk.c index 1b3027ba..d2ca6eb2 100644 --- a/hypervisor/printk.c +++ b/hypervisor/printk.c @@ -1,7 +1,7 @@ /* * Jailhouse, a Linux-based partitioning hypervisor * - * Copyright (c) Siemens AG, 2013-2019 + * Copyright (c) Siemens AG, 2013-2022 * * Authors: * Jan Kiszka <[email protected]> @@ -10,10 +10,10 @@ * the COPYING file in the top-level directory. */ -#include <stdarg.h> #include <jailhouse/control.h> #include <jailhouse/printk.h> #include <jailhouse/processor.h> +#include <jailhouse/stdarg.h> #include <jailhouse/string.h> #include <asm/spinlock.h> diff --git a/inmates/lib/include/stdarg.h b/inmates/lib/include/stdarg.h new file mode 100644 index 00000000..21e58850 --- /dev/null +++ b/inmates/lib/include/stdarg.h @@ -0,0 +1,43 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Copyright (c) Siemens AG, 2022 + * + * Authors: + * Jan Kiszka <[email protected]> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + * Alternatively, you can use or redistribute this file under the following + * BSD license: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +typedef __builtin_va_list va_list; + +#define va_start(ap, last) __builtin_va_start(ap, last) +#define va_arg(ap, type) __builtin_va_arg(ap, type) +#define va_end(ap) __builtin_va_end(ap) -- 2.31.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/dd4819ed-9b00-7e2b-3d02-acbc25f1e1c4%40web.de.
