package/taglib: fix build on sparc

Fix the following build failure on sparc raised since bump to version
1.12 in commit b4bdf704fe:

/home/giuliobenetti/autobuild/run/instance-3/output-1/build/taglib-1.12/taglib/toolkit/trefcounter.cpp:55:21: error: duplicate 'volatile'
   55 | # define ATOMIC_INT volatile int
      |                     ^~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/387feeb6bcc190b3908e405ba5f8a888d7e1f348

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Fabrice Fontaine 2021-12-15 18:29:17 +01:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 03943b9b49
commit 7cd070e4f0

View file

@ -0,0 +1,34 @@
From 1d24bd3399f2284104cbe87d017f87325b1797ab Mon Sep 17 00:00:00 2001
From: Oleg Antonyan <oleg.b.antonyan@gmail.com>
Date: Thu, 13 May 2021 16:41:35 +0200
Subject: [PATCH] =?UTF-8?q?Fix=20"error:=20duplicate=20=E2=80=98volatile?=
=?UTF-8?q?=E2=80=99"=20on=20systems=20without=20HAVE=5FGCC=5FATOMIC=20in?=
=?UTF-8?q?=201.12=20(#1012)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix error: duplicate volatile
* fix volatile ATOMIC_INT in constructor
[Retrieved from:
https://github.com/taglib/taglib/commit/1d24bd3399f2284104cbe87d017f87325b1797ab]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
taglib/toolkit/trefcounter.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/taglib/toolkit/trefcounter.cpp b/taglib/toolkit/trefcounter.cpp
index 18cb596c0..5b089abf9 100644
--- a/taglib/toolkit/trefcounter.cpp
+++ b/taglib/toolkit/trefcounter.cpp
@@ -52,7 +52,7 @@
# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
#else
-# define ATOMIC_INT volatile int
+# define ATOMIC_INT int
# define ATOMIC_INC(x) (++x)
# define ATOMIC_DEC(x) (--x)
#endif