diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index e0ddb88593..39b6ace798 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -202,9 +202,11 @@ struct ble_gap_slave_state { static bssnz_t struct ble_gap_slave_state ble_gap_slave[BLE_ADV_INSTANCES]; +#if NIMBLE_BLE_ADVERTISE #if MYNEWT_VAL(BLE_EXT_ADV) static bool ext_adv_legacy_configured = false; #endif +#endif struct ble_gap_update_entry { SLIST_ENTRY(ble_gap_update_entry) next; @@ -2914,6 +2916,7 @@ ble_gap_adv_start(uint8_t own_addr_type, const ble_addr_t *direct_addr, #endif } +#if NIMBLE_BLE_ADVERTISE #if MYNEWT_VAL(BLE_EXT_ADV) static int ble_gap_ext_adv_legacy_preconfigure(void) @@ -2945,6 +2948,7 @@ ble_gap_ext_adv_legacy_preconfigure(void) return 0; } #endif +#endif int ble_gap_adv_set_data(const uint8_t *data, int data_len)