diff options
| author | Kohei Tokunaga <ktokunaga.mail@gmail.com> | 2025-04-28 15:39:03 +0900 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-06 16:02:04 +0200 |
| commit | 0f46bf659f015d4860c7212b4a6f0656b312d4f4 (patch) | |
| tree | ad2ff5ed61c6942cb1f149bfb617cf973465bb34 /include/qemu/osdep.h | |
| parent | 208808242f8a34ac93e73c1c1dbafe4c00498f5e (diff) | |
| download | focaccia-qemu-0f46bf659f015d4860c7212b4a6f0656b312d4f4.tar.gz focaccia-qemu-0f46bf659f015d4860c7212b4a6f0656b312d4f4.zip | |
include/qemu/osdep.h: Add Emscripten-specific OS dependencies
On emscripten, some implementations in os-posix.c can't be used such as daemonizing and changing user. This commit introduces os-wasm.c and os-wasm.h which are forked from os-posix.c and os-posix.h and patched for targetting Emscripten. Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com> Link: https://lore.kernel.org/r/9fc7b106ecf86675b4532bd6778b7b5945442f89.1745820062.git.ktokunaga.mail@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
| -rw-r--r-- | include/qemu/osdep.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 4397a90680..96fe51bc39 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -8,7 +8,7 @@ * To avoid getting into possible circular include dependencies, this * file should not include any other QEMU headers, with the exceptions * of config-host.h, config-target.h, qemu/compiler.h, - * system/os-posix.h, system/os-win32.h, glib-compat.h and + * system/os-posix.h, system/os-win32.h, system/os-wasm.h, glib-compat.h and * qemu/typedefs.h, all of which are doing a similar job to this file * and are under similar constraints. * @@ -164,10 +164,14 @@ QEMU_EXTERN_C int daemon(int, int); #include "system/os-win32.h" #endif -#ifdef CONFIG_POSIX +#if defined(CONFIG_POSIX) && !defined(EMSCRIPTEN) #include "system/os-posix.h" #endif +#if defined(EMSCRIPTEN) +#include "system/os-wasm.h" +#endif + #ifdef __cplusplus extern "C" { #endif |