public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2] emulator: Fix compilation on big endian systems
@ 2026-02-10  9:32 Bastien Nocera
  2026-02-10 11:18 ` [BlueZ,v2] " bluez.test.bot
  2026-02-10 18:00 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Bastien Nocera @ 2026-02-10  9:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

This fixes the build on big endian systems like s390x:

Remove the "static" so the array doesn't need to be initialised
with constants.

emulator/bthost.c: In function ‘bthost_setup_sco’:
./src/shared/util.h:43:26: error: initializer element is not constant
   43 | #define cpu_to_le32(val) bswap_32(val)
      |                          ^~~~~~~~
etc.

Fixes: 85888a8357ea ("bthost: add bthost_setup_sco() and accept
incoming eSCO")
---
 emulator/bthost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emulator/bthost.c b/emulator/bthost.c
index d09ad1e76c50..53b12f828675 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -3560,7 +3560,7 @@ void bthost_hci_disconnect(struct bthost *bthost, uint16_t handle,
 int bthost_setup_sco(struct bthost *bthost, uint16_t acl_handle,
 							uint16_t setting)
 {
-	static const struct bt_hci_cmd_setup_sync_conn settings[] = {
+	const struct bt_hci_cmd_setup_sync_conn settings[] = {
 		{
 			.tx_bandwidth = cpu_to_le32(0x00001f40),
 			.rx_bandwidth = cpu_to_le32(0x00001f40),
-- 
2.52.0


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

end of thread, other threads:[~2026-02-10 18:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10  9:32 [PATCH BlueZ v2] emulator: Fix compilation on big endian systems Bastien Nocera
2026-02-10 11:18 ` [BlueZ,v2] " bluez.test.bot
2026-02-10 18:00 ` [PATCH BlueZ v2] " 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