diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2019-12-19 09:33:19 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2019-12-19 17:51:31 -0800 |
commit | 5034f8d8d5e05dc1a477d5fabe486a0997679b97 (patch) | |
tree | 9172775161c18e87bedb1ae46be5772485eb2dfc /src | |
parent | 43792c50d4c8de1c30456666cc9ee1c945d67991 (diff) |
forkfd: fix build with GCC 4.8 & 4.9
Prior to GCC 5.x, std::atomic_int was a typedef to __atomic_base<int>,
which meant we couldn't use it in atomic_compare_exchange that requires
pointers to std::atomic<int>. That changed in 5.x (r219790) in response
to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940.
Easy fix, though.
Fixes: QTBUG-80896
Change-Id: I46bf1f65e8db46afbde5fffd15e1d625154f8d59
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/forkfd/forkfd_c11.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/forkfd/forkfd_c11.h b/src/3rdparty/forkfd/forkfd_c11.h index f3dc2b5357..2b1d3f181e 100644 --- a/src/3rdparty/forkfd/forkfd_c11.h +++ b/src/3rdparty/forkfd/forkfd_c11.h @@ -36,7 +36,7 @@ # define FFD_ATOMIC_ACQUIRE std::memory_order_acquire # define FFD_ATOMIC_RELEASE std::memory_order_release // acq_rel & cst not necessary -typedef std::atomic_int ffd_atomic_int; +typedef std::atomic<int> ffd_atomic_int; #else # include <stdatomic.h> # define ffd_atomic_pointer(type) _Atomic(type*) |