From 1a5680034ea3cf08d37f69545f39c21203db8fac Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 31 Oct 2020 13:35:07 -0600 Subject: [PATCH] Fix bogus volatiles caught by gcc-11 --- flatpak-gcc11.patch | 39 +++++++++++++++++++++++++++++++++++++++ flatpak.spec | 8 +++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 flatpak-gcc11.patch diff --git a/flatpak-gcc11.patch b/flatpak-gcc11.patch new file mode 100644 index 0000000..bfc02af --- /dev/null +++ b/flatpak-gcc11.patch @@ -0,0 +1,39 @@ +diff --git a/common/flatpak-enum-types.c.template b/common/flatpak-enum-types.c.template +index 063fd19..0eed041 100644 +--- a/common/flatpak-enum-types.c.template ++++ b/common/flatpak-enum-types.c.template +@@ -15,7 +15,7 @@ + GType + @enum_name@_get_type (void) + { +- static volatile gsize g_define_type_id__volatile = 0; ++ static gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { +diff --git a/common/flatpak-portal-error.c b/common/flatpak-portal-error.c +index 1389707..57c0e78 100644 +--- a/common/flatpak-portal-error.c ++++ b/common/flatpak-portal-error.c +@@ -38,7 +38,7 @@ static const GDBusErrorEntry flatpak_error_entries[] = { + GQuark + flatpak_portal_error_quark (void) + { +- static volatile gsize quark_volatile = 0; ++ static gsize quark_volatile = 0; + + g_dbus_error_register_error_domain ("flatpak-portal-error-quark", + &quark_volatile, +diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c +index 16c307e..5461457 100644 +--- a/common/flatpak-utils.c ++++ b/common/flatpak-utils.c +@@ -94,7 +94,7 @@ propagate_libarchive_error (GError **error, + GQuark + flatpak_error_quark (void) + { +- static volatile gsize quark_volatile = 0; ++ static gsize quark_volatile = 0; + + g_dbus_error_register_error_domain ("flatpak-error-quark", + &quark_volatile, diff --git a/flatpak.spec b/flatpak.spec index 2513680..c19317e 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -3,7 +3,7 @@ Name: flatpak Version: 1.8.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Application deployment framework for desktop apps License: LGPLv2+ @@ -16,6 +16,9 @@ Patch0: 3845.patch Patch1: 3849.patch Patch2: 3850.patch +# Fix bogus volatiles caught by gcc-11 +Patch3: %{name}-gcc11.patch + BuildRequires: pkgconfig(appstream-glib) BuildRequires: pkgconfig(dconf) BuildRequires: pkgconfig(fuse) @@ -270,6 +273,9 @@ fi %changelog +* Sat Oct 31 2020 Jeff Law - 1.8.2-3 +- Fix bogus volatiles caught by gcc-11 + * Fri Sep 11 2020 Kalev Lember - 1.8.2-2 - Backport various OCI fixes from upstream