diff options
Diffstat (limited to 'tools/checkwps')
-rw-r--r-- | tools/checkwps/checkwps.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 17098d2b06..ffe428885d 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c | |||
@@ -43,6 +43,8 @@ const int nb_settings = 0; | |||
43 | (((unsigned long)(x) & 0xff0000ul) >> 8) | \ | 43 | (((unsigned long)(x) & 0xff0000ul) >> 8) | \ |
44 | (((unsigned long)(x) & 0xff00ul) << 8) | \ | 44 | (((unsigned long)(x) & 0xff00ul) << 8) | \ |
45 | ((unsigned long)(x) << 24))) | 45 | ((unsigned long)(x) << 24))) |
46 | |||
47 | #ifndef letoh16 | ||
46 | unsigned short letoh16(unsigned short x) | 48 | unsigned short letoh16(unsigned short x) |
47 | { | 49 | { |
48 | unsigned short n = 0x1234; | 50 | unsigned short n = 0x1234; |
@@ -56,7 +58,9 @@ unsigned short letoh16(unsigned short x) | |||
56 | return SWAP_16(x); | 58 | return SWAP_16(x); |
57 | } | 59 | } |
58 | } | 60 | } |
61 | #endif | ||
59 | 62 | ||
63 | #ifndef letoh32 | ||
60 | unsigned short letoh32(unsigned short x) | 64 | unsigned short letoh32(unsigned short x) |
61 | { | 65 | { |
62 | unsigned short n = 0x1234; | 66 | unsigned short n = 0x1234; |
@@ -70,7 +74,9 @@ unsigned short letoh32(unsigned short x) | |||
70 | return SWAP_32(x); | 74 | return SWAP_32(x); |
71 | } | 75 | } |
72 | } | 76 | } |
77 | #endif | ||
73 | 78 | ||
79 | #ifndef htole32 | ||
74 | unsigned int htole32(unsigned int x) | 80 | unsigned int htole32(unsigned int x) |
75 | { | 81 | { |
76 | unsigned short n = 0x1234; | 82 | unsigned short n = 0x1234; |
@@ -84,6 +90,7 @@ unsigned int htole32(unsigned int x) | |||
84 | return SWAP_32(x); | 90 | return SWAP_32(x); |
85 | } | 91 | } |
86 | } | 92 | } |
93 | #endif | ||
87 | 94 | ||
88 | int read_line(int fd, char* buffer, int buffer_size) | 95 | int read_line(int fd, char* buffer, int buffer_size) |
89 | { | 96 | { |