diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2021-11-04 16:23:11 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-07 18:27:38 +0300 |
commit | 4e88118c20fc5fa7890230da2d26f0235dd904f5 (patch) | |
tree | d29e1acd0c8976a23575cd859f842510d1261a12 /tools/perf/util/data-convert-bt.c | |
parent | b3a018fc31fea05ffd034952b4b6e9e1eb0812bc (diff) | |
download | linux-4e88118c20fc5fa7890230da2d26f0235dd904f5.tar.xz |
perf tools: Use __BYTE_ORDER__
Switch from the libc-defined __BYTE_ORDER to the compiler-defined
__BYTE_ORDER__ in order to make endianness detection more robust, like
it was done for libbpf.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/20211104132311.984703-1-iii@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/data-convert-bt.c')
-rw-r--r-- | tools/perf/util/data-convert-bt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c index aa862a26d95c..8f7705bbc2da 100644 --- a/tools/perf/util/data-convert-bt.c +++ b/tools/perf/util/data-convert-bt.c @@ -1437,7 +1437,7 @@ static struct bt_ctf_field_type *create_int_type(int size, bool sign, bool hex) bt_ctf_field_type_integer_set_base(type, BT_CTF_INTEGER_BASE_HEXADECIMAL)) goto err; -#if __BYTE_ORDER == __BIG_ENDIAN +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ bt_ctf_field_type_set_byte_order(type, BT_CTF_BYTE_ORDER_BIG_ENDIAN); #else bt_ctf_field_type_set_byte_order(type, BT_CTF_BYTE_ORDER_LITTLE_ENDIAN); |