ayaports/backports/signal-desktop/webrtc-boringssl-c7019036-do-not-define-crypto_addc.patch
Antoine Martin 743ceb8dbe
All checks were successful
/ lint (pull_request) Successful in 38s
/ build-x86_64 (pull_request) Successful in 21m27s
/ deploy-x86_64 (pull_request) Successful in 44s
/ deploy-aarch64 (pull_request) Successful in 1m3s
/ build-aarch64 (pull_request) Successful in 1h3m14s
backports/signal-desktop: upgrade to 7.22.2
2024-09-05 16:05:34 -04:00

25 lines
949 B
Diff

diff --git a/third_party/boringssl/src/crypto/internal.h b/third_party/boringssl/src/crypto/internal.h
index a77102d76..a45f97bcc 100644
--- a/third_party/boringssl/src/crypto/internal.h
+++ b/third_party/boringssl/src/crypto/internal.h
@@ -1174,6 +1174,11 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
// Arithmetic functions.
+// The most efficient versions of these functions on GCC and Clang depend on C11
+// |_Generic|. If we ever need to call these from C++, we'll need to add a
+// variant that uses C++ overloads instead.
+#if !defined(__cplusplus)
+
// CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
// bit. |carry| must be zero or one.
#if OPENSSL_HAS_BUILTIN(__builtin_addc)
@@ -1275,6 +1280,8 @@ static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
#define CRYPTO_subc_w CRYPTO_subc_u32
#endif
+#endif // !__cplusplus
+
// FIPS functions.