mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 01:23:00 -04:00
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 <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
4fd113b5ce
commit
b390d85060
1 changed files with 13 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue