public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] transport: Fix build with A2DP support disabled
@ 2025-09-12  0:32 Bastien Nocera
  2025-09-12  2:19 ` [BlueZ] " bluez.test.bot
  2025-09-18 13:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Bastien Nocera @ 2025-09-12  0:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arun Raghavan

$ ./bootstrap-configure --disable-a2dp && make
[...]
profiles/audio/transport.c: In function ‘media_transport_update_delay’:
profiles/audio/transport.c:2653:33: error: implicit declaration of function ‘a2dp_avdtp_get’ [-Wimplicit-function-declaration]
 2653 |                 a2dp->session = a2dp_avdtp_get(transport->device);
      |                                 ^~~~~~~~~~~~~~
profiles/audio/transport.c:2653:31: error: assignment to ‘struct avdtp *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2653 |                 a2dp->session = a2dp_avdtp_get(transport->device);
      |                               ^

Reported-by: Arun Raghavan <arun@accosted.net>
Fixes: 0bb66d3d1abd ("transport: fix A2DP Delay values missing from DBus")
---
 profiles/audio/transport.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index ab149bcd728b..2fceb5121a34 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -2643,6 +2643,7 @@ void *media_transport_get_stream(struct media_transport *transport)
 void media_transport_update_delay(struct media_transport *transport,
 							uint16_t delay)
 {
+#ifdef HAVE_A2DP
 	struct a2dp_transport *a2dp = transport->data;
 
 	/* Check if delay really changed */
@@ -2657,6 +2658,7 @@ void media_transport_update_delay(struct media_transport *transport,
 	g_dbus_emit_property_changed(btd_get_dbus_connection(),
 					transport->path,
 					MEDIA_TRANSPORT_INTERFACE, "Delay");
+#endif /* HAVE_A2DP */
 }
 
 struct btd_device *media_transport_get_dev(struct media_transport *transport)
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-18 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12  0:32 [PATCH BlueZ] transport: Fix build with A2DP support disabled Bastien Nocera
2025-09-12  2:19 ` [BlueZ] " bluez.test.bot
2025-09-18 13:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox