aboutsummaryrefslogtreecommitdiff
path: root/src/network/ntohl.c
blob: d99ebc05205cd5686fa1d3df523ff8af3147eafa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <netinet/in.h>
#include <byteswap.h>

uint32_t ntohl(uint32_t n)
{
	union { int i; char c; } u = { 1 };
	return u.c ? bswap_32(n) : n;
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif