diff --git a/libvirt.spec b/libvirt.spec index 18f00296295759ac8fcf21667cf1d98a4931861e..99301e4651aa32a6c3db24b070eacb89e1e0b7a8 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -105,7 +105,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 6.2.0 -Release: 18 +Release: 19 License: LGPLv2+ URL: https://libvirt.org/ @@ -180,6 +180,7 @@ Patch0063: libvirt-Add-retry-support-for-error-policy.patch Patch0064: qemu-Support-retry-BLOCK_IO_ERROR-event.patch Patch0065: add-phytium-2000plus-and-s2500-support-on-arm-archit.patch Patch0066: libvirt-conf-Set-default-values-of-retry-fileds.patch +Patch0067: tests-virmockstathelpers-add-static-declaration-for-xstat.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -1914,6 +1915,10 @@ exit 0 %changelog +* Thu May 27 2021 Jiajie Li +- libvirt.spec: fix rpmbuild error for OBS +- tests/virmockstathelpers: add declaration for xstat functions + * Fri Mar 19 2021 Jiajie Li - libvirt.spec: remove dtrace for aarch64 OS diff --git a/tests-virmockstathelpers-add-static-declaration-for-xstat.patch b/tests-virmockstathelpers-add-static-declaration-for-xstat.patch new file mode 100644 index 0000000000000000000000000000000000000000..c7c09fb581e5bff59cf9872ef37d89bdb449e47f --- /dev/null +++ b/tests-virmockstathelpers-add-static-declaration-for-xstat.patch @@ -0,0 +1,53 @@ +From 22cbf9307622315fc1c1f0efd939064e4b6d4cd5 Mon Sep 17 00:00:00 2001 +From: Jiajie Li +Date: Thu, 27 May 2021 16:52:57 +0800 +Subject: [PATCH] tests/virmockstathelpers: add static declaration for xstat + functions + +A rpmbuild error in OBS occurred: + +``` +error: no previous prototype for '__xstat' [-Werror=missing-prototypes] +``` + +Add static declaration to fix that. + +Signed-off-by: Jiajie Li +--- + .vscode/settings.json | 7 +++++++ + tests/virmock.h | 6 ++++++ + 2 files changed, 13 insertions(+) + create mode 100644 .vscode/settings.json + +diff --git a/.vscode/settings.json b/.vscode/settings.json +new file mode 100644 +index 0000000000..8d11d74f6c +--- /dev/null ++++ b/.vscode/settings.json +@@ -0,0 +1,7 @@ ++{ ++ "files.associations": { ++ "viralloc.h": "c", ++ "virmock.h": "c", ++ "stat.h": "c" ++ } ++} +\ No newline at end of file +diff --git a/tests/virmock.h b/tests/virmock.h +index 95feeb0d92..19cb643314 100644 +--- a/tests/virmock.h ++++ b/tests/virmock.h +@@ -298,3 +298,9 @@ + abort(); \ + } \ + } while (0) ++ ++ ++int __xstat(int ver, const char *path, struct stat *sb); ++int __xstat64(int ver, const char *path, struct stat64 *sb); ++int __lxstat(int ver, const char *path, struct stat *sb); ++int __lxstat64(int ver, const char *path, struct stat64 *sb); +\ No newline at end of file +-- +2.23.0 +