Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23c85b9a authored by Michael Sun's avatar Michael Sun
Browse files

floss: fix build error for clang++14

clang++14 no longer allow 'typedef struct {...} foo_t;' But require:
`struct foo_t {...};` instead.

The build error with clang++14 is:

../../../staging/bt/system/include/hardware/bt_av.h:124:9: error: C++
requires a type specifier for all declarations
typedef btav_a2dp_codec_config_t {
~~~~~~~ ^

Bug: 242950190
Test: ./build.py

Change-Id: Ic237ccc03ae36b282354abbfbcbb3e2f08e84744
parent 45661c40
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ typedef enum {
 * For codec capability, fields "sample_rate", "bits_per_sample" and
 * For codec capability, fields "sample_rate", "bits_per_sample" and
 * "channel_mode" can contain bit-masks with all supported features.
 * "channel_mode" can contain bit-masks with all supported features.
 */
 */
typedef struct {
struct btav_a2dp_codec_config_t {
  btav_a2dp_codec_index_t codec_type;
  btav_a2dp_codec_index_t codec_type;
  btav_a2dp_codec_priority_t
  btav_a2dp_codec_priority_t
      codec_priority;  // Codec selection priority
      codec_priority;  // Codec selection priority
@@ -241,7 +241,7 @@ typedef struct {
    result += name;
    result += name;
    return result;
    return result;
  }
  }
} btav_a2dp_codec_config_t;
};


typedef struct {
typedef struct {
  btav_a2dp_scmst_enable_status_t enable_status;
  btav_a2dp_scmst_enable_status_t enable_status;