Fix FTBFS with GCC 11

This commit is contained in:
Guido Aulisi 2021-05-04 12:39:34 +02:00
parent a0ab34658c
commit dc3ca3fae8
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/headers/gx_system.h b/src/headers/gx_system.h
index d334ecfc..88d97567 100644
--- a/src/headers/gx_system.h
+++ b/src/headers/gx_system.h
@@ -132,7 +132,7 @@ inline T *atomic_get(T*& p) {
template <class T>
inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv) {
- return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), static_cast<void*>(oldv), newv);
+ return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void**>(p), static_cast<void*>(oldv), newv);
}

View File

@ -5,13 +5,18 @@
Name: guitarix
Version: 0.42.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A virtual guitar amplifier
License: GPLv2+
URL: http://guitarix.sourceforge.net/
Source0: http://sourceforge.net/projects/%{name}/files/%{name}/%{altname2}-%{version}.tar.xz
Source1: %{name}.appdata.xml
# Fix compilation with gcc 11 and glib g_atomic_pointer_compare_and_exchange()
# See https://developer.gnome.org/glib/stable/glib-Atomic-Operations.html#g-atomic-pointer-compare-and-exchange
# Patch from upstream https://sourceforge.net/p/guitarix/git/ci/d8f003484c57d808682025dfb07a7a1fb848afdc/
Patch0: %{name}-gcc-11-compat-volatile-atomic-variables.patch
BuildRequires: gcc-c++
BuildRequires: python3
BuildRequires: %{_bindir}/find
@ -219,6 +224,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
%{_libdir}/lv2/*
%changelog
* Tue May 04 2021 Guido Aulisi <guido.aulisi@gmail.com> - 0.42.1-4
- Fix FTBFS with GCC 11
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.42.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild