1From 7a27f13c192d15cae47740f3e884bba16f15ed41 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sat, 26 Sep 2020 22:03:10 +0200
4Subject: [PATCH] tests/lib/test_trace_ir_ref.c: rename user structure
5
6Rename user structure to bt_user to avoid the following build failure
7with uclibc:
8
9test_trace_ir_ref.c:41:8: error: redefinition of 'struct user'
10 struct user {
11        ^
12In file included from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/procfs.h:33,
13                 from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/ucontext.h:25,
14                 from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/signal.h:329,
15                 from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/glib-2.0/glib/gbacktrace.h:36,
16                 from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/glib-2.0/glib.h:34,
17                 from ../../src/common/assert.h:28,
18                 from ../../src/lib/object.h:28,
19                 from test_trace_ir_ref.c:25:
20/home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/user.h:48:8: note: originally defined here
21 struct user
22        ^~~~
23
24Fixes:
25 - http://autobuild.buildroot.org/results/e4229e2b9c892b419a9d2eaa6929b80ea62dd130
26
27Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
28[Upstream status: https://github.com/efficios/babeltrace/pull/115]
29---
30 tests/lib/test_trace_ir_ref.c | 4 ++--
31 1 file changed, 2 insertions(+), 2 deletions(-)
32
33diff --git a/tests/lib/test_trace_ir_ref.c b/tests/lib/test_trace_ir_ref.c
34index d5dfa9cf..70caf29c 100644
35--- a/tests/lib/test_trace_ir_ref.c
36+++ b/tests/lib/test_trace_ir_ref.c
37@@ -25,7 +25,7 @@
38
39 #define NR_TESTS 37
40
41-struct user {
42+struct bt_user {
43 	bt_trace_class *tc;
44 	bt_stream_class *sc;
45 	bt_event_class *ec;
46@@ -265,7 +265,7 @@ static void test_example_scenario(bt_self_component_source *self_comp)
47 	bt_stream_class *weak_sc1 = NULL, *weak_sc2 = NULL;
48 	bt_event_class *weak_ec1 = NULL, *weak_ec2 = NULL,
49 			*weak_ec3 = NULL;
50-	struct user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };
51+	struct bt_user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };
52
53 	/* The only reference which exists at this point is on TC1. */
54 	tc1 = create_tc1(self_comp);
55--
562.28.0
57
58