aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-05-14 11:28:11 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-14 11:28:11 -0400
commitb390d850607346162467bf1805a365e07de7c079 (patch)
tree0c887966da19a2bb3013161291421930953275b7 /tools/lib
parent4fd113b5ce803da0b8fa0494513bedfdf2feb483 (diff)
tools lib traceevent: Provide le16toh define for older systems
Where such macro is not present, so just copy its definition from glibc's endian.h and define it if not already. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/n/tip-4j90i2na07ppidt0z6cbuxr7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib')
-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 4592d8438318..ec57d0c1fbc2 100644
--- a/tools/lib/traceevent/plugin_cfg80211.c
+++ b/tools/lib/traceevent/plugin_cfg80211.c
@@ -4,6 +4,19 @@
4#include <endian.h> 4#include <endian.h>
5#include "event-parse.h" 5#include "event-parse.h"
6 6
7/*
8 * From glibc endian.h, for older systems where it is not present, e.g.: RHEL5,
9 * Fedora6.
10 */
11#ifndef le16toh
12# if __BYTE_ORDER == __LITTLE_ENDIAN
13# define le16toh(x) (x)
14# else
15# define le16toh(x) __bswap_16 (x)
16# endif
17#endif
18
19
7static unsigned long long 20static unsigned long long
8process___le16_to_cpup(struct trace_seq *s, unsigned long long *args) 21process___le16_to_cpup(struct trace_seq *s, unsigned long long *args)
9{ 22{