diff --git a/vendor/netbsd-curses/netbsd_sys/endian.h b/vendor/netbsd-curses/netbsd_sys/endian.h index 012869d..1c312aa 100644 --- a/vendor/netbsd-curses/netbsd_sys/endian.h +++ b/vendor/netbsd-curses/netbsd_sys/endian.h @@ -33,6 +33,12 @@ static __inline uint16_t nbs_bswap16(uint16_t __x) #endif #define __CAST(__dt, __st) ((__dt)(__st)) +/* NetBSD's own already defines le16dec, le32dec, le16enc and + * le32enc (as inline functions since 1998), so this replacement contradicts it + * -- "redefinition of 'le16enc'", which stopped the cross build + * (build/logs/release-2026-11-23i-cross.log:94). Only a libc without them + * needs the block; the guard asks the header that provides them. */ +#ifndef __NetBSD__ static inline uint16_t le16dec(const void *buf) { @@ -66,6 +72,7 @@ le32enc(void *buf, uint32_t u) p[2] = __CAST(uint8_t, ((u >> 16) & 0xff)); p[3] = __CAST(uint8_t, ((u >> 24) & 0xff)); } +#endif /* !__NetBSD__ */ #endif