Skip to content

Commit 7a9a10c

Browse files
authored
fix(net): Rework NO_GLOBALS to not act on dependent network classes (espressif#11933)
1 parent af57237 commit 7a9a10c

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

libraries/ESPmDNS/src/ESPmDNS.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ class MDNSResponder {
127127
mdns_txt_item_t *_getResultTxt(int idx, int txtIdx);
128128
};
129129

130-
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_MDNS)
131130
extern MDNSResponder MDNS;
132-
#endif
133131

134132
#endif /* CONFIG_MDNS_MAX_INTERFACES */
135133
#endif //ESP32MDNS_H

libraries/Ethernet/src/ETH.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,8 @@ size_t ETHClass::printDriverInfo(Print &out) const {
11741174
return bytes;
11751175
}
11761176

1177+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_ETH)
11771178
ETHClass ETH;
1179+
#endif
11781180

11791181
#endif /* CONFIG_ETH_ENABLED */

libraries/Network/src/NetworkManager.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ class NetworkManager : public NetworkEvents, public Printable {
3131
}
3232
};
3333

34-
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_NETWORK)
3534
extern NetworkManager Network;
36-
#endif

libraries/PPP/src/PPP.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ size_t PPPClass::printDriverInfo(Print &out) const {
763763
return bytes;
764764
}
765765

766+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_PPP)
766767
PPPClass PPP;
768+
#endif
767769

768770
#endif /* CONFIG_LWIP_PPP_SUPPORT */

libraries/WiFi/src/WiFi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ class WiFiClass : public WiFiGenericClass, public WiFiSTAClass, public WiFiScanC
7272
bool isProvEnabled();
7373
};
7474

75-
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_WIFI)
7675
extern WiFiClass WiFi;
77-
#endif
7876

7977
#endif /* SOC_WIFI_SUPPORTED */

0 commit comments

Comments
 (0)