blob: 491e6a9e4e81469547525dacd516ab8e1e6e5599 [file] [log] [blame]
#include <byteswap.h>
#include <netinet/in.h>
uint16_t htons(uint16_t n) {
union {
int i;
char c;
} u = {1};
return u.c ? bswap_16(n) : n;
}