Sign in
fuchsia
/
fuchsia
/
83854f31e881f0f9aa2bd848a84a94e01fb09dd9
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
network
/
htonl.c
blob: fc27343b1d6f471945423e1890ddea197379d886 [
file
] [
log
] [
blame
]
#include
<byteswap.h>
#include
<netinet/in.h>
uint32_t
htonl
(
uint32_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_32
(
n
)
:
n
;
}