fa84ac8c99f6a77b0b040bd44a09bb1361316c4f
[packages.git] / net / wing / patches / 010-libc-compat.patch
1 --- a/lib/radiotap.c
2 +++ b/lib/radiotap.c
3 @@ -16,6 +16,17 @@
4  #include <click/radiotap_iter.h>
5  #include <click/platform.h>
6  
7 +#if !defined(le32toh) || !defined(le16toh)
8 +#  if BYTE_ORDER == LITTLE_ENDIAN
9 +#    define le32toh(x) (x)
10 +#    define le16toh(x) (x)
11 +#  else
12 +#    include <byteswap.h>
13 +#    define le32toh(x) bswap_32(x)
14 +#    define le16toh(x) bswap_16(x)
15 +#  endif
16 +#endif
17 +
18  /* function prototypes and related defs are in radiotap_iter.h */
19  
20  static const struct radiotap_align_size rtap_namespace_sizes[] = {