diff --git a/nimble/host/services/ras/src/ble_svc_ras.c b/nimble/host/services/ras/src/ble_svc_ras.c index a197977f2..d84d2dbbf 100644 --- a/nimble/host/services/ras/src/ble_svc_ras.c +++ b/nimble/host/services/ras/src/ble_svc_ras.c @@ -28,6 +28,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 @@ -518,3 +519,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 45f3967c8..370523fca 100644 --- a/nimble/host/src/ble_gatts.c +++ b/nimble/host/src/ble_gatts.c @@ -3641,7 +3641,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();