Skip to content

Commit

Permalink
3rdparty/protobuf: fix compilation issue on s390
Browse files Browse the repository at this point in the history
This commit fixes an issue while trying to compile
on s390x architecture.

This is simply a backport of a fixe already applied
in official protobuf code:
- protocolbuffers/protobuf#3955
  • Loading branch information
ldevulder committed Sep 30, 2018
1 parent 1059735 commit ac9ec55
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -146,6 +146,14 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
return __atomic_load_n(ptr, __ATOMIC_RELAXED);
}

inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
__atomic_compare_exchange_n(ptr, &old_value, new_value, false,
__ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
return old_value;
}

#endif // defined(__LP64__)

} // namespace internal
Expand Down

0 comments on commit ac9ec55

Please sign in to comment.