Skip to content

Commit 3c8c82b

Browse files
committed
make posible IAR compilation
IAR dosen't support "flexible array member" in c++ compilation pm_peer_data_local_gatt_db_t::data[] -> pm_peer_data_local_gatt_db_t::data[1]
1 parent 17c7250 commit 3c8c82b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,12 @@ typedef struct
175175
{
176176
uint32_t flags; /**< @brief Flags that describe the database attributes. */
177177
uint16_t len; /**< @brief Size of the attribute array. */
178+
179+
#ifdef __ICCARM__ //IAR dosen't support "flexible array member" in c++ compilation
180+
uint8_t data[1]; /**< @brief Array to hold the database attributes. */
181+
#else
178182
uint8_t data[]; /**< @brief Array to hold the database attributes. */
183+
#endif
179184
} pm_peer_data_local_gatt_db_t;
180185

181186

0 commit comments

Comments
 (0)