diff options
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch | 76 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt_git.bb | 1 |
2 files changed, 77 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch b/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch new file mode 100644 index 00000000..7263666a --- /dev/null +++ b/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | From c4636402c06ab5ae436176daf0ef17005346e27d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
| 3 | Date: Mon, 2 Sep 2024 22:15:51 -0700 | ||
| 4 | Subject: [PATCH] qemu_nbdkit.c: use %llu to print time_t | ||
| 5 | |||
| 6 | Use %lu to print time_t will give use the following error: | ||
| 7 | |||
| 8 | error: format '%lu' expects argument of type 'long unsigned int', | ||
| 9 | but argument 10 has type 'time_t' {aka 'long long int'} [-Werror=format=] | ||
| 10 | |||
| 11 | So use %llu to print time_t. | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/FQSQMML6VWMHNWBYP67OLCUTJY5LJQST/] | ||
| 14 | |||
| 15 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 16 | --- | ||
| 17 | src/qemu/qemu_nbdkit.c | 24 ++++++++++++------------ | ||
| 18 | 1 file changed, 12 insertions(+), 12 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c | ||
| 21 | index f099f35e1e..fe660c78e5 100644 | ||
| 22 | --- a/src/qemu/qemu_nbdkit.c | ||
| 23 | +++ b/src/qemu/qemu_nbdkit.c | ||
| 24 | @@ -544,18 +544,18 @@ qemuNbdkitCapsFormatCache(qemuNbdkitCaps *nbdkitCaps) | ||
| 25 | |||
| 26 | virBufferEscapeString(&buf, "<path>%s</path>\n", | ||
| 27 | nbdkitCaps->path); | ||
| 28 | - virBufferAsprintf(&buf, "<nbdkitctime>%lu</nbdkitctime>\n", | ||
| 29 | - nbdkitCaps->ctime); | ||
| 30 | + virBufferAsprintf(&buf, "<nbdkitctime>%llu</nbdkitctime>\n", | ||
| 31 | + (long long)nbdkitCaps->ctime); | ||
| 32 | virBufferEscapeString(&buf, "<plugindir>%s</plugindir>\n", | ||
| 33 | nbdkitCaps->pluginDir); | ||
| 34 | - virBufferAsprintf(&buf, "<plugindirmtime>%lu</plugindirmtime>\n", | ||
| 35 | - nbdkitCaps->pluginDirMtime); | ||
| 36 | + virBufferAsprintf(&buf, "<plugindirmtime>%llu</plugindirmtime>\n", | ||
| 37 | + (long long)nbdkitCaps->pluginDirMtime); | ||
| 38 | virBufferEscapeString(&buf, "<filterdir>%s</filterdir>\n", | ||
| 39 | nbdkitCaps->filterDir); | ||
| 40 | - virBufferAsprintf(&buf, "<filterdirmtime>%lu</filterdirmtime>\n", | ||
| 41 | - nbdkitCaps->filterDirMtime); | ||
| 42 | - virBufferAsprintf(&buf, "<selfctime>%lu</selfctime>\n", | ||
| 43 | - nbdkitCaps->libvirtCtime); | ||
| 44 | + virBufferAsprintf(&buf, "<filterdirmtime>%llu</filterdirmtime>\n", | ||
| 45 | + (long long)nbdkitCaps->filterDirMtime); | ||
| 46 | + virBufferAsprintf(&buf, "<selfctime>%llu</selfctime>\n", | ||
| 47 | + (long long)nbdkitCaps->libvirtCtime); | ||
| 48 | virBufferAsprintf(&buf, "<selfvers>%u</selfvers>\n", | ||
| 49 | nbdkitCaps->libvirtVersion); | ||
| 50 | |||
| 51 | @@ -593,10 +593,10 @@ virNbdkitCapsSaveFile(void *data, | ||
| 52 | return -1; | ||
| 53 | } | ||
| 54 | |||
| 55 | - VIR_DEBUG("Saved caps '%s' for '%s' with (%lu, %lu)", | ||
| 56 | + VIR_DEBUG("Saved caps '%s' for '%s' with (%llu, %llu)", | ||
| 57 | filename, nbdkitCaps->path, | ||
| 58 | - nbdkitCaps->ctime, | ||
| 59 | - nbdkitCaps->libvirtCtime); | ||
| 60 | + (long long)nbdkitCaps->ctime, | ||
| 61 | + (long long)nbdkitCaps->libvirtCtime); | ||
| 62 | |||
| 63 | return 0; | ||
| 64 | } | ||
| 65 | @@ -1054,7 +1054,7 @@ qemuNbdkitProcessBuildCommandCurl(qemuNbdkitProcess *proc, | ||
| 66 | } | ||
| 67 | |||
| 68 | if (proc->source->timeout > 0) { | ||
| 69 | - g_autofree char *timeout = g_strdup_printf("%llu", proc->source->timeout); | ||
| 70 | + g_autofree char *timeout = g_strdup_printf("%llu", (long long)proc->source->timeout); | ||
| 71 | virCommandAddArgPair(cmd, "timeout", timeout); | ||
| 72 | } | ||
| 73 | |||
| 74 | -- | ||
| 75 | 2.25.1 | ||
| 76 | |||
diff --git a/recipes-extended/libvirt/libvirt_git.bb b/recipes-extended/libvirt/libvirt_git.bb index 143a8b58..5a04afa3 100644 --- a/recipes-extended/libvirt/libvirt_git.bb +++ b/recipes-extended/libvirt/libvirt_git.bb | |||
| @@ -39,6 +39,7 @@ SRC_URI = "gitsm://github.com/libvirt/libvirt.git;name=libvirt;protocol=https;br | |||
| 39 | file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ | 39 | file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ |
| 40 | file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \ | 40 | file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \ |
| 41 | file://0001-tests-meson-clear-absolute-directory-paths.patch \ | 41 | file://0001-tests-meson-clear-absolute-directory-paths.patch \ |
| 42 | file://0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch \ | ||
| 42 | " | 43 | " |
| 43 | 44 | ||
| 44 | S = "${WORKDIR}/git" | 45 | S = "${WORKDIR}/git" |
