mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
139 B
11 lines
139 B
|
15 years ago
|
#include <netinet/in.h>
|
||
|
|
|
||
|
|
uint16_t ntohs(uint16_t n)
|
||
|
|
{
|
||
|
|
union {
|
||
|
|
uint16_t s;
|
||
|
|
uint8_t b[2];
|
||
|
|
} u = { n };
|
||
|
|
return (u.b[0]<<8) | u.b[1];
|
||
|
|
}
|