summaryrefslogtreecommitdiff
path: root/tools/lib/traceevent/plugin_cfg80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/traceevent/plugin_cfg80211.c')
-rw-r--r--tools/lib/traceevent/plugin_cfg80211.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/lib/traceevent/plugin_cfg80211.c b/tools/lib/traceevent/plugin_cfg80211.c
index 4592d8438..ec57d0c1f 100644
--- a/tools/lib/traceevent/plugin_cfg80211.c
+++ b/tools/lib/traceevent/plugin_cfg80211.c
@@ -4,6 +4,19 @@
#include <endian.h>
#include "event-parse.h"
+/*
+ * From glibc endian.h, for older systems where it is not present, e.g.: RHEL5,
+ * Fedora6.
+ */
+#ifndef le16toh
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define le16toh(x) (x)
+# else
+# define le16toh(x) __bswap_16 (x)
+# endif
+#endif
+
+
static unsigned long long
process___le16_to_cpup(struct trace_seq *s, unsigned long long *args)
{