0002-tests-lib-test_trace_ir_ref.c-rename-user-structure.patch 2.6 KB

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