0001-fix-build-issue-with-gcc-10.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. From 72324e9415d2757a5f0f028865f841de70e1d0c4 Mon Sep 17 00:00:00 2001
  2. From: Heiko Thiery <heiko.thiery@gmail.com>
  3. Date: Sun, 12 Jul 2020 14:18:09 +0200
  4. Subject: [PATCH] fix build issue with gcc 10
  5. This patch is created on top of tagged version v2.1.0.
  6. An upstream fix commit [1] for this issue is already in upstream master but
  7. does not apply on current used version in buildroot.
  8. [1] https://github.com/Arkq/bluez-alsa/commit/30a23dd7ce9b00c702fa48545f6b03038f9e17c6
  9. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
  10. [Fabrice: also update src/ofono-iface.h]
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  12. ---
  13. src/bluealsa-dbus.c | 4 ++++
  14. src/bluealsa-iface.c | 2 ++
  15. src/bluealsa-iface.h | 4 ----
  16. src/bluealsa.c | 3 +++
  17. src/bluez-a2dp.h | 3 ---
  18. src/bluez-iface.h | 3 ---
  19. src/bluez.c | 3 +++
  20. 7 files changed, 12 insertions(+), 10 deletions(-)
  21. diff --git a/src/bluealsa-dbus.c b/src/bluealsa-dbus.c
  22. index 5e748e3..4c9cd3d 100644
  23. --- a/src/bluealsa-dbus.c
  24. +++ b/src/bluealsa-dbus.c
  25. @@ -33,6 +33,10 @@
  26. #include "shared/defs.h"
  27. #include "shared/log.h"
  28. +extern const GDBusInterfaceInfo bluealsa_iface_manager;
  29. +extern const GDBusInterfaceInfo bluealsa_iface_pcm;
  30. +extern const GDBusInterfaceInfo bluealsa_iface_rfcomm;
  31. +
  32. static GVariant *ba_variant_new_device_path(const struct ba_device *d) {
  33. return g_variant_new_object_path(d->bluez_dbus_path);
  34. }
  35. diff --git a/src/bluealsa-iface.c b/src/bluealsa-iface.c
  36. index 71810c7..55b79c9 100644
  37. --- a/src/bluealsa-iface.c
  38. +++ b/src/bluealsa-iface.c
  39. @@ -10,6 +10,8 @@
  40. #include "bluealsa-iface.h"
  41. +#define BLUEALAS_IFACE_C
  42. +
  43. static const GDBusArgInfo arg_codec = {
  44. -1, "codec", "q", NULL
  45. };
  46. diff --git a/src/bluealsa-iface.h b/src/bluealsa-iface.h
  47. index 262fb76..4f3e85b 100644
  48. --- a/src/bluealsa-iface.h
  49. +++ b/src/bluealsa-iface.h
  50. @@ -32,8 +32,4 @@
  51. #define BLUEALSA_RFCOMM_MODE_HSP_AG "HSP-AG"
  52. #define BLUEALSA_RFCOMM_MODE_HSP_HS "HSP-HS"
  53. -const GDBusInterfaceInfo bluealsa_iface_manager;
  54. -const GDBusInterfaceInfo bluealsa_iface_pcm;
  55. -const GDBusInterfaceInfo bluealsa_iface_rfcomm;
  56. -
  57. #endif
  58. diff --git a/src/bluealsa.c b/src/bluealsa.c
  59. index 929f9ed..690c407 100644
  60. --- a/src/bluealsa.c
  61. +++ b/src/bluealsa.c
  62. @@ -20,6 +20,9 @@
  63. #include "bluez-a2dp.h"
  64. #include "hfp.h"
  65. +/* NULL-terminated list of available A2DP codecs */
  66. +extern const struct bluez_a2dp_codec **bluez_a2dp_codecs;
  67. +
  68. /* Initialize global configuration variable. */
  69. struct ba_config config = {
  70. diff --git a/src/bluez-a2dp.h b/src/bluez-a2dp.h
  71. index 7c0e33b..127dbd9 100644
  72. --- a/src/bluez-a2dp.h
  73. +++ b/src/bluez-a2dp.h
  74. @@ -57,7 +57,4 @@ struct bluez_a2dp_codec {
  75. size_t samplings_size;
  76. };
  77. -/* NULL-terminated list of available A2DP codecs */
  78. -const struct bluez_a2dp_codec **bluez_a2dp_codecs;
  79. -
  80. #endif
  81. diff --git a/src/bluez-iface.h b/src/bluez-iface.h
  82. index 34269c5..250267e 100644
  83. --- a/src/bluez-iface.h
  84. +++ b/src/bluez-iface.h
  85. @@ -27,7 +27,4 @@
  86. #define BLUEZ_TRANSPORT_STATE_PENDING "pending"
  87. #define BLUEZ_TRANSPORT_STATE_ACTIVE "active"
  88. -const GDBusInterfaceInfo bluez_iface_endpoint;
  89. -const GDBusInterfaceInfo bluez_iface_profile;
  90. -
  91. #endif
  92. diff --git a/src/bluez.c b/src/bluez.c
  93. index cfdbff8..190101e 100644
  94. --- a/src/bluez.c
  95. +++ b/src/bluez.c
  96. @@ -45,6 +45,9 @@
  97. # define G_DBUS_ERROR_UNKNOWN_OBJECT G_DBUS_ERROR_FAILED
  98. #endif
  99. +extern const GDBusInterfaceInfo bluez_iface_endpoint;
  100. +extern const GDBusInterfaceInfo bluez_iface_profile;
  101. +
  102. /**
  103. * Structure describing registered D-Bus object. */
  104. struct dbus_object_data {
  105. diff --git a/src/ofono-iface.h b/src/ofono-iface.h
  106. index d5a6715..d5b9065 100644
  107. --- a/src/ofono-iface.h
  108. +++ b/src/ofono-iface.h
  109. @@ -1,6 +1,6 @@
  110. /*
  111. * BlueALSA - ofono-iface.h
  112. - * Copyright (c) 2016-2019 Arkadiusz Bokowy
  113. + * Copyright (c) 2016-2020 Arkadiusz Bokowy
  114. * 2018 Thierry Bultel
  115. *
  116. * This file is a part of bluez-alsa.
  117. @@ -27,6 +27,6 @@
  118. #define OFONO_AUDIO_CODEC_CVSD 0x01
  119. #define OFONO_AUDIO_CODEC_MSBC 0x02
  120. -const GDBusInterfaceInfo ofono_iface_hf_audio_agent;
  121. +extern const GDBusInterfaceInfo ofono_iface_hf_audio_agent;
  122. #endif
  123. --
  124. 2.20.1