diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c index 1e5f73e324c..5d512d448a3 100644 --- a/cores/esp32/esp32-hal-bt.c +++ b/cores/esp32/esp32-hal-bt.c @@ -15,7 +15,7 @@ #include "esp32-hal-bt.h" #if SOC_BT_SUPPORTED -#ifdef CONFIG_BT_BLUEDROID_ENABLED +#if defined(CONFIG_BT_BLUEDROID_ENABLED) && __has_include("esp_bt.h") #if CONFIG_IDF_TARGET_ESP32 bool btInUse() {