Fix Clang compilation of BlueZ
PATCH 1/1 Fix Clang compilation of BlueZ
When trying to compile as much as I can in Gentoo with CLang, I realized that Bluez is not compiling due to a function definition inside a function, which is not allowed by clang.
I am not sure if this may be the best solution, but I've made a patch that makes it compile without errors (not sure if it runs good yet though).
I hope it is useful for reviewing and applying if you consider necesary,
Thanks,
David C. Manuelda
profiles/midi/midi.c +9 -9
@@ -71,20 +71,20 @@ struct midi {struct midi_write_parser midi_out; }; +void foreach_cb (const struct midi_write_parser *parser,void *user_data) { +struct midi *midi = user_data; +bt_gatt_client_write_without_response (midi->client, + midi->midi_io_handle, + false, +midi_write_data (parser), +midi_write_data_size (parser)); +} +static bool midi_write_cb (struct io *io,void *user_data) {struct midi *midi = user_data;int err; -void foreach_cb (const struct midi_write_parser *parser,void *user_data) { -struct midi *midi = user_data; -bt_gatt_client_write_without_response (midi->client, - midi->midi_io_handle, - false, -midi_write_data (parser), -midi_write_data_size (parser)); - }; - do { snd_seq_event_t *event = NULL;
Luiz Augusto von Dentz
maintainerHi,
Quoted 8 lines · StormByte
When trying to compile as much as I can in Gentoo with CLang, I realized that Bluez is not compiling due to a function definition inside a function, which is not allowed by clang.
I am not sure if this may be the best solution, but I've made a patch that makes it compile without errors (not sure if it runs good yet though).
I hope it is useful for reviewing and applying if you consider necesary,
Apparently this one passed the review, but we normally don't allow such construction, anyway do you mind sending a proper patch as stated in HACKING?
Quoted 5 lines
Thanks,
David C. Manuelda
Signature · 1 line
Luiz Augusto von Dentz