c656b2b191560ce5ccc167fbeb2b926d8cc2fc37
[openwrt/svn-archive/archive.git] / net / wing / patches / 010-libc-compat.patch
1 Index: wing-20110329/lib/radiotap.c
2 ===================================================================
3 --- wing-20110329.orig/lib/radiotap.c 2011-07-05 15:33:21.000000000 +0200
4 +++ wing-20110329/lib/radiotap.c 2011-07-05 18:57:58.110124772 +0200
5 @@ -16,6 +16,17 @@
6 #include <click/radiotap_iter.h>
7 #include <click/platform.h>
8
9 +#if !defined(le32toh) || !defined(le16toh)
10 +# if BYTE_ORDER == LITTLE_ENDIAN
11 +# define le32toh(x) (x)
12 +# define le16toh(x) (x)
13 +# else
14 +# include <byteswap.h>
15 +# define le32toh(x) bswap_32(x)
16 +# define le16toh(x) bswap_16(x)
17 +# endif
18 +#endif
19 +
20 /* function prototypes and related defs are in radiotap_iter.h */
21
22 static const struct radiotap_align_size rtap_namespace_sizes[] = {