[PATCH libgcrypt 1/2] cipher:aria: Fix compiler error on NetBSD.
Collin Funk via Gcrypt-devel <[email protected]> Thu, 1 May 2025 22:20:57 -0700
| Newsgroups | gmane.comp.encryption.gpg.libgcrypt.devel |
|---|---|
| Message-ID | <[email protected]> |
* cipher/aria.c (bswap32) [__NetBSD__]: Define internal function to something else to avoid possible system definitions. -- GnuPG-bug-id: 7633 Signed-off-by: Collin Funk <[email protected]> --- cipher/aria.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cipher/aria.c b/cipher/aria.c index bc2d4384..cabae4a6 100644 --- a/cipher/aria.c +++ b/cipher/aria.c @@ -641,6 +641,11 @@ u32 rotr32(u32 v, u32 r) return ror(v, r); } +/* Avoid a compiler error due to the definition of bswap32 on NetBSD. */ +#if defined (__NetBSD__) +#undef bswap32 +#define bswap32 _aria_bswap32 +#endif static ALWAYS_INLINE u32 bswap32(u32 v) { -- 2.49.0