--- a/include/mptcpd/private/sockaddr.h 2022-07-24 18:29:37.995613204 +0200 +++ b/include/mptcpd/private/sockaddr.h 2022-07-24 18:30:53.802312010 +0200 @@ -24,6 +24,16 @@ * These macros may be used in place of @c htons() or @c htonl() when * initializing an IPv4 address or IP port constant at compile-time. */ +#ifndef __bswap_constant_16 +#define __bswap_constant_16(x) \ + ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) +#endif +#ifndef __bswap_constant_32 +#define __bswap_constant_32(x) \ + ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ + | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) +#endif + ///@{ #if __BYTE_ORDER == __LITTLE_ENDIAN # define MPTCPD_CONSTANT_HTONS(hs) __bswap_constant_16(hs)