Show More
@@ -13,6 +13,7 b'' | |||||
13 | #include <stdlib.h> |
|
13 | #include <stdlib.h> | |
14 | #include <string.h> |
|
14 | #include <string.h> | |
15 | #ifdef _WIN32 |
|
15 | #ifdef _WIN32 | |
|
16 | #include <stdint.h> | |||
16 | static uint32_t htonl(uint32_t x) |
|
17 | static uint32_t htonl(uint32_t x) | |
17 | { |
|
18 | { | |
18 | return ((x & 0x000000ffUL) << 24) | |
|
19 | return ((x & 0x000000ffUL) << 24) | | |
@@ -21,6 +22,7 b' static uint32_t htonl(uint32_t x)' | |||||
21 | ((x & 0xff000000UL) >> 24); |
|
22 | ((x & 0xff000000UL) >> 24); | |
22 | } |
|
23 | } | |
23 | #else |
|
24 | #else | |
|
25 | #include <sys/types.h> | |||
24 | #include <netinet/in.h> |
|
26 | #include <netinet/in.h> | |
25 | #endif |
|
27 | #endif | |
26 |
|
28 |
@@ -24,6 +24,7 b'' | |||||
24 | #include <stdlib.h> |
|
24 | #include <stdlib.h> | |
25 | #include <string.h> |
|
25 | #include <string.h> | |
26 | #ifdef _WIN32 |
|
26 | #ifdef _WIN32 | |
|
27 | #include <stdint.h> | |||
27 | static uint32_t ntohl(uint32_t x) |
|
28 | static uint32_t ntohl(uint32_t x) | |
28 | { |
|
29 | { | |
29 | return ((x & 0x000000ffUL) << 24) | |
|
30 | return ((x & 0x000000ffUL) << 24) | | |
@@ -32,6 +33,7 b' static uint32_t ntohl(uint32_t x)' | |||||
32 | ((x & 0xff000000UL) >> 24); |
|
33 | ((x & 0xff000000UL) >> 24); | |
33 | } |
|
34 | } | |
34 | #else |
|
35 | #else | |
|
36 | #include <sys/types.h> | |||
35 | #include <netinet/in.h> |
|
37 | #include <netinet/in.h> | |
36 | #endif |
|
38 | #endif | |
37 |
|
39 |
General Comments 0
You need to be logged in to leave comments.
Login now