X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2F80211Bundle%2Fradiotap.c;fp=senf%2FPackets%2F80211Bundle%2Fradiotap.c;h=fa6c67de038d599596bec4b3c7300df7f9e69bce;hb=2d54670ccdd4125df7dbb897afde882b6ec505ee;hp=f176a552dffdd06a030e76549067bdb2b4f35154;hpb=5083ed2a2fe087df2f981b3f66eaf0fb130243eb;p=senf.git diff --git a/senf/Packets/80211Bundle/radiotap.c b/senf/Packets/80211Bundle/radiotap.c index f176a55..fa6c67d 100644 --- a/senf/Packets/80211Bundle/radiotap.c +++ b/senf/Packets/80211Bundle/radiotap.c @@ -22,12 +22,23 @@ # include # -# ifndef HAVE_LE16TOH -# define le16toh(x) (x) -# endif -# -# ifndef HAVE_LE32TOH -# define le32toh(x) (x) +# ifdef BYTEORDER_LITTLE_ENDIAN +# ifndef HAVE_LE16TOH +# define le16toh(x) (x) +# endif +# ifndef HAVE_LE32TOH +# define le32toh(x) (x) +# endif +# else +# if !defined(HAVE_LE16TOH) || !defined(HAVE_LE32TOH) +# include +# endif +# ifndef HAVE_LE16TOH +# define le16toh(x) bswap_16(x) +# endif +# ifndef HAVE_LE32TOH +# define le32toh(x) bswap_32(x) +# endif # endif # # include "radiotap/radiotap.c"