Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
6651ef1f060738ee1f50cac1fe6d8ce64c359022
/
.
/
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
;
}