Skip to content

Commit 0151766

Browse files
committed
fix ESP32 build with NIMBLE_TWO
1 parent 03fb5f9 commit 0151766

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/nimble/NimbleBluetooth.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414
#ifdef NIMBLE_TWO
1515
#include "NimBLEAdvertising.h"
16+
#ifdef CONFIG_BT_NIMBLE_EXT_ADV
1617
#include "NimBLEExtAdvertising.h"
18+
#endif
1719
#include "PowerStatus.h"
1820
#endif
1921

@@ -388,7 +390,7 @@ void NimbleBluetooth::setupService()
388390

389391
void NimbleBluetooth::startAdvertising()
390392
{
391-
#ifdef NIMBLE_TWO
393+
#if defined(NIMBLE_TWO) && defined(CONFIG_BT_NIMBLE_EXT_ADV)
392394
NimBLEExtAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
393395
NimBLEExtAdvertisement legacyAdvertising;
394396

0 commit comments

Comments
 (0)