[PATCH libgcrypt v2] cipher:aria: Fix compiler error on NetBSD.
Collin Funk via Gcrypt-devel <[email protected]> Fri, 2 May 2025 10:53:49 -0700
| Newsgroups | gmane.comp.encryption.gpg.libgcrypt.devel |
|---|---|
| Message-ID | <[email protected]> |
* cipher/aria.c (bswap32): Remove function that conflicts with system definitions on NetBSD. (aria_diff_byte): Use _gcry_bswap32. -- GnuPG-bug-id: 7633 Signed-off-by: Collin Funk <[email protected]> --- cipher/aria.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cipher/aria.c b/cipher/aria.c index bc2d4384..26546a63 100644 --- a/cipher/aria.c +++ b/cipher/aria.c @@ -641,12 +641,6 @@ u32 rotr32(u32 v, u32 r) return ror(v, r); } -static ALWAYS_INLINE -u32 bswap32(u32 v) -{ - return _gcry_bswap32(v); -} - static ALWAYS_INLINE u32 get_u8(u32 x, u32 y) { @@ -727,7 +721,7 @@ static inline void aria_diff_byte(u32 *t1, u32 *t2, u32 *t3) { *t1 = ((*t1 << 8) & 0xff00ff00) ^ ((*t1 >> 8) & 0x00ff00ff); *t2 = rotr32(*t2, 16); - *t3 = bswap32(*t3); + *t3 = _gcry_bswap32(*t3); } /* Key XOR Layer */ -- 2.49.0