mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-16 06:30:41 +00:00
LibC: Uhm, htonl() shouldn't byte-swap on big endian machines.
This commit is contained in:
parent
3c4497aa2d
commit
0538adbabd
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue