HomeFreeBSD

net/relayd: fix build on big-endian architectures

Description

net/relayd: fix build on big-endian architectures

siphash.c:67:7: error: incompatible pointer to integer conversion passing 'const u_int64_t *' (aka 'const unsigned long *') to parameter of type 'unsigned long' [-Wint-conversion]

67 |         k0 = le64toh(&key->k0);
   |              ^~~~~~~~~~~~~~~~~

/usr/include/sys/_endian.h:130:30: note: expanded from macro 'le64toh'

130 | #define le64toh(x)      __bswap64((x))
    |                         ~~~~~~~~~~^~~~

/usr/include/sys/_endian.h:85:40: note: expanded from macro '__bswap64'

85 | #define __bswap64(x)    __builtin_bswap64(x)
   |                                           ^

siphash.c:68:7: error: incompatible pointer to integer conversion passing 'const u_int64_t *' (aka 'const unsigned long *') to parameter of type 'unsigned long' [-Wint-conversion]

68 |         k1 = le64toh(&key->k1);
   |              ^~~~~~~~~~~~~~~~~

/usr/include/sys/_endian.h:130:30: note: expanded from macro 'le64toh'

130 | #define le64toh(x)      __bswap64((x))
    |                         ~~~~~~~~~~^~~~

/usr/include/sys/_endian.h:85:40: note: expanded from macro '__bswap64'

85 | #define __bswap64(x)    __builtin_bswap64(x)
   |                                           ^

siphash.c:194:16: error: incompatible pointer to integer conversion passing 'u_int64_t *' (aka 'unsigned long *') to parameter of type 'unsigned long'; dereference with * [-Wint-conversion]

194 |         u_int64_t m = le64toh((u_int64_t *)ctx->buf);
    |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/include/sys/_endian.h:130:30: note: expanded from macro 'le64toh'

130 | #define le64toh(x)      __bswap64((x))
    |                         ~~~~~~~~~~^~~~

/usr/include/sys/_endian.h:85:40: note: expanded from macro '__bswap64'

85 | #define __bswap64(x)    __builtin_bswap64(x)
   |                                           ^

3 errors generated.

Details

Provenance
pkubajAuthored on Sep 2 2025, 12:09 PM
Parents
R11:d407ee543206: java/java3d: fix installation
Branches
Unknown
Tags
Unknown