Sign in
chromium
/
external
/
github.com
/
WebAssembly
/
musl
/
a223dbd27ae36fe53f9f67f86caf685b729593fc
/
.
/
src
/
network
/
htonl.c
blob: 6622d16cc5351749d1b76c5f24aa71009b018ff0 [
file
] [
log
] [
blame
]
#include
<netinet/in.h>
#include
<byteswap.h>
uint32_t
htonl
(
uint32_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_32
(
n
)
:
n
;
}