blob: 8b850049539bbc9e643db6245ea48342aca5bc90 [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;
}