diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-11-21 00:08:19 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-11-21 00:08:19 -0500 |
| commit | d76bc6736cad58a388839a37eac695d01546cc71 (patch) | |
| tree | 0f945b9a1d6a5cee496f5777e0553e138989ce74 /recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch | |
| parent | 19241a745fb91864bd7b78168b0aabc156473329 (diff) | |
| download | meta-virtualization-d76bc6736cad58a388839a37eac695d01546cc71.tar.gz | |
xen: introduce 4.21 recipes
This introduces the 4.21 recipes. Along with the main Xen and Xen-tools
updates, we also have the following:
- two compile patches for xen and xen-tools that fix issues with the
way yajl is pickup in the yocto environment
- packaging of the new libxenmanage libraries
- fixup of the watchdog system units
- updates to the test packaging (new directories)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch')
| -rw-r--r-- | recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch b/recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch new file mode 100644 index 00000000..91767406 --- /dev/null +++ b/recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | From 9b7072697616ffd19fcefcd3ec48eec481faf4e6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Thu, 20 Nov 2025 23:22:59 -0500 | ||
| 4 | Subject: [PATCH] tools/libxl: Fix build with NOCPUID and json-c | ||
| 5 | |||
| 6 | The stub file `tools/libs/light/libxl_nocpuid.c`, used when CPUID | ||
| 7 | support is disabled via `CONFIG_NOCPUID`, was incomplete. It was | ||
| 8 | missing a stub implementation for the `json-c` function | ||
| 9 | `libxl_cpuid_policy_list_gen_jso`. | ||
| 10 | |||
| 11 | When building with both `CONFIG_NOCPUID` and `HAVE_LIBJSONC` (which | ||
| 12 | is preferred by configure over yajl), auto-generated code in | ||
| 13 | `_libxl_types.c` would reference `libxl_cpuid_policy_list_gen_jso`, | ||
| 14 | leading to a linker error due to the undefined reference. | ||
| 15 | |||
| 16 | Additionally, the file was missing a prototype for the `yajl` function | ||
| 17 | `libxl_cpuid_policy_list_gen_json`, causing a compiler error | ||
| 18 | (`-Werror=missing-prototypes`) in builds that did manage to select | ||
| 19 | `yajl`. | ||
| 20 | |||
| 21 | This commit fixes both issues by: | ||
| 22 | 1. Adding the missing function prototype for the `yajl` function. | ||
| 23 | 2. Adding the missing stub implementation for the `json-c` function, | ||
| 24 | guarded by `HAVE_LIBJSONC`. | ||
| 25 | |||
| 26 | This ensures that xen-tools can be built successfully in all | ||
| 27 | configurations related to CPUID and JSON library selection. | ||
| 28 | |||
| 29 | Upstream-Status: Inappropriate [oe specific] | ||
| 30 | |||
| 31 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 32 | --- | ||
| 33 | tools/libs/light/libxl_nocpuid.c | 15 +++++++++++++++ | ||
| 34 | 1 file changed, 15 insertions(+) | ||
| 35 | |||
| 36 | Index: xen-tools-4.21+stable/tools/libs/light/libxl_nocpuid.c | ||
| 37 | =================================================================== | ||
| 38 | --- xen-tools-4.21+stable.orig/tools/libs/light/libxl_nocpuid.c | ||
| 39 | +++ xen-tools-4.21+stable/tools/libs/light/libxl_nocpuid.c | ||
| 40 | @@ -16,6 +16,21 @@ | ||
| 41 | |||
| 42 | #include <yajl/yajl_gen.h> | ||
| 43 | |||
| 44 | +#include "libxl_json.h" | ||
| 45 | + | ||
| 46 | +#include <yajl/yajl_gen.h> | ||
| 47 | + | ||
| 48 | +yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand, | ||
| 49 | + libxl_cpuid_policy_list *pcpuid); | ||
| 50 | + | ||
| 51 | +#ifdef HAVE_LIBJSONC | ||
| 52 | +int libxl_cpuid_policy_list_gen_jso(json_object **jso_r, | ||
| 53 | + libxl_cpuid_policy_list *pcpuid) | ||
| 54 | +{ | ||
| 55 | + return 0; | ||
| 56 | +} | ||
| 57 | +#endif | ||
| 58 | + | ||
| 59 | int libxl__cpuid_policy_is_empty(libxl_cpuid_policy_list *pl) | ||
| 60 | { | ||
| 61 | return 1; | ||
