LibC: Uhm, htonl() shouldn't byte-swap on big endian machines.

This commit is contained in:
Andreas Kling 2019-06-26 21:10:56 +02:00
parent 3c4497aa2d
commit 0538adbabd

View file

@ -27,7 +27,11 @@ inline uint16_t ntohs(uint16_t value)
inline uint32_t htonl(uint32_t value)
{
#if BYTE_ORDER == LITTLE_ENDIAN
return __builtin_bswap32(value);
#else
return value;
#endif
}
inline uint32_t ntohl(uint32_t value)