Compatibility with gcc 4.x

Reported by @pedro0311

Fixes #1507
This commit is contained in:
Frank Denis
2026-01-13 20:00:17 +01:00
parent d603d6b151
commit 4a7692a723
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
- Performance: SHA3 (Keccak1600) now leverages ARM SHA3 instructions when
available on ARM platforms.
- Export missing crypto_ipcrypt_nd_keygen() helper function.
- Fixed compilation with GCC on aarch64.
- Fixed compilation with GCC on aarch64 and gcc 4.1
- Libsodium can be directly used as a dependency in a Zig project.
* Version 1.0.21
+1 -1
View File
@@ -308,7 +308,7 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_index, const uint8_t bit_va
uint8_t mask = (uint8_t) -((bit_value & 1));
# if defined(__GNUC__) || defined(__clang__)
__asm__ __volatile__("" : "+r"(mask)::);
__asm__ __volatile__("" : "+r"(mask) :);
# endif
ip16[byte_index] = (ip16[byte_index] & ~bit_mask) | (bit_mask & mask);
}
@@ -340,7 +340,7 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_index, const uint8_t bit_va
uint8_t mask = (uint8_t) -((bit_value & 1));
# if defined(__GNUC__) || defined(__clang__)
__asm__ __volatile__("" : "+r"(mask)::);
__asm__ __volatile__("" : "+r"(mask) :);
# endif
ip16[byte_index] = (ip16[byte_index] & ~bit_mask) | (bit_mask & mask);
}
+1 -1
View File
@@ -284,7 +284,7 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_index, const uint8_t bit_va
uint8_t mask = (uint8_t) -((bit_value & 1));
#if defined(__GNUC__) || defined(__clang__)
__asm__ __volatile__("" : "+r"(mask)::);
__asm__ __volatile__("" : "+r"(mask) :);
#endif
ip16[byte_index] = (ip16[byte_index] & ~bit_mask) | (bit_mask & mask);
}