Skip to content

Commit 8107395

Browse files
committed
fix(build): Fix WiFi Captive Portal for IDF 5.3
1 parent 03749f0 commit 8107395

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libraries/WiFi/src/AP.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ bool APClass::enableNAPT(bool enable) {
305305
return true;
306306
}
307307

308+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 2)
308309
bool APClass::enableDhcpCaptivePortal() {
309310
esp_err_t err = ESP_OK;
310311
static char captiveportal_uri[32] = {
@@ -343,6 +344,7 @@ bool APClass::enableDhcpCaptivePortal() {
343344

344345
return true;
345346
}
347+
#endif
346348

347349
String APClass::SSID(void) const {
348350
if (!started()) {

libraries/WiFi/src/WiFiAP.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ class APClass : public NetworkInterface {
5353

5454
bool bandwidth(wifi_bandwidth_t bandwidth);
5555
bool enableNAPT(bool enable = true);
56+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 2)
5657
bool enableDhcpCaptivePortal();
58+
#endif
5759

5860
String SSID(void) const;
5961
uint8_t stationCount();

0 commit comments

Comments
 (0)