summaryrefslogtreecommitdiff
path: root/tools/checkwps
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checkwps')
-rw-r--r--tools/checkwps/checkwps.c7
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
46unsigned short letoh16(unsigned short x) 48unsigned 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
60unsigned short letoh32(unsigned short x) 64unsigned 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
74unsigned int htole32(unsigned int x) 80unsigned 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
88int read_line(int fd, char* buffer, int buffer_size) 95int read_line(int fd, char* buffer, int buffer_size)
89{ 96{