diff --git a/nimble/host/services/ras/src/ble_svc_ras.c b/nimble/host/services/ras/src/ble_svc_ras.c index a62e2d644..5a3db7b89 100644 --- a/nimble/host/services/ras/src/ble_svc_ras.c +++ b/nimble/host/services/ras/src/ble_svc_ras.c @@ -29,6 +29,7 @@ #include "nimble/hci_common.h" #include "esp_nimble_mem.h" +#if MYNEWT_VAL(BLE_GATTS) && CONFIG_BT_NIMBLE_RAS_SERVICE #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif @@ -522,3 +523,4 @@ ble_svc_ras_init(void) { reset_ranging_buffer(); } +#endif diff --git a/nimble/host/src/ble_gatts.c b/nimble/host/src/ble_gatts.c index 5bffff0e5..599c14983 100644 --- a/nimble/host/src/ble_gatts.c +++ b/nimble/host/src/ble_gatts.c @@ -3674,7 +3674,8 @@ ble_gatts_reset(void) #if MYNEWT_VAL(BLE_SVC_HID_SERVICE) ble_svc_hid_reset(); #endif -#if MYNEWT_VAL(BLE_STATIC_TO_DYNAMIC) + +#if MYNEWT_VAL(BLE_STATIC_TO_DYNAMIC) && CONFIG_BT_NIMBLE_SPS_SERVICE ble_svc_sps_reset(); #endif ble_hs_unlock();