[PATCH BlueZ] transport: Fix build with A2DP support disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$ ./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@xxxxxxxxxxxx>
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





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux