From 76a4f9f82c1207ac313bbe78780d4ee9cf644e26 Mon Sep 17 00:00:00 2001 From: laokz Date: Sat, 25 Feb 2023 11:45:56 +0800 Subject: [PATCH] Backport upstream patch to fix cast-align error on some arches (cherry picked from commit a93fc5df6447559419f33ffb9762ed7eacb01de3) --- 0002-Suppress-cast-align-error.patch | 28 ++++++++++++++++++++++++++++ libgovirt.spec | 6 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0002-Suppress-cast-align-error.patch diff --git a/0002-Suppress-cast-align-error.patch b/0002-Suppress-cast-align-error.patch new file mode 100644 index 0000000..fda2f8e --- /dev/null +++ b/0002-Suppress-cast-align-error.patch @@ -0,0 +1,28 @@ +From bae26c0033d649722b5a3fc48df3adf2172490f1 Mon Sep 17 00:00:00 2001 +From: Sprite +Date: Tue, 6 Sep 2022 18:17:35 +0800 +Subject: [PATCH] Suppress error 'cast increases required alignment of target + type' + +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index d5c3627..43139af 100644 +--- a/meson.build ++++ b/meson.build +@@ -61,9 +61,9 @@ govirt_global_cflags = ['-std=c99', + '-Wextra', + '-Werror', + '-Wcast-align', ++ '-Wno-error=cast-align', + '-Wmissing-declarations', + '-Wpointer-arith', +- '-Wcast-align', + '-Wwrite-strings', + '-Winit-self', + '-Wreturn-type', +-- +GitLab + diff --git a/libgovirt.spec b/libgovirt.spec index d44061f..809a64b 100644 --- a/libgovirt.spec +++ b/libgovirt.spec @@ -1,11 +1,12 @@ Name: libgovirt Version: 0.3.9 -Release: 1 +Release: 2 Summary: A GObject-based library to access oVirt REST API License: LGPLv2+ URL: https://gitlab.gnome.org/GNOME/libgovirt Source0: http://ftp.gnome.org/pub/GNOME/sources/libgovirt/0.3/%{name}-%{version}.tar.xz Patch1: 0001-Fix-i18n-generation.patch +Patch2: 0002-Suppress-cast-align-error.patch BuildRequires: glib2-devel intltool rest-devel >= 0.9.1 BuildRequires: gobject-introspection-devel glib-networking dconf gnupg2 @@ -61,6 +62,9 @@ that use libgovirt. %{_datadir}/gir-1.0/GoVirt-1.0.gir %changelog +* Mon Feb 27 2023 laokz - 0.3.9-2 +- Backport upstream patch to fix cast-align error on some arches + * Fri Dec 2 2022 lin zhang - 0.3.9-1 - Upgrade to version 0.3.9 -- Gitee