Skip to content

Commit b8db173

Browse files
Merge pull request #53 from ESP32Async/compat
Replace `#if ESP_IDF_VERSION_MAJOR < 5` with `#if __has_include(<IPv6Address.h>)`
2 parents 790d218 + 5770b20 commit b8db173

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AsyncTCP.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#ifdef ARDUINO
1313
#include "IPAddress.h"
14-
#if ESP_IDF_VERSION_MAJOR < 5
14+
#if __has_include(<IPv6Address.h>)
1515
#include "IPv6Address.h"
1616
#endif
1717
#endif
@@ -91,7 +91,7 @@ class AsyncClient {
9191
bool connect(ip_addr_t addr, uint16_t port);
9292
#ifdef ARDUINO
9393
bool connect(const IPAddress &ip, uint16_t port);
94-
#if ESP_IDF_VERSION_MAJOR < 5
94+
#if __has_include(<IPv6Address.h>)
9595
bool connect(const IPv6Address &ip, uint16_t port);
9696
#endif
9797
#endif
@@ -205,7 +205,7 @@ class AsyncClient {
205205
ip6_addr_t getRemoteAddress6() const;
206206
ip6_addr_t getLocalAddress6() const;
207207
#ifdef ARDUINO
208-
#if ESP_IDF_VERSION_MAJOR < 5
208+
#if __has_include(<IPv6Address.h>)
209209
IPv6Address remoteIP6() const;
210210
IPv6Address localIP6() const;
211211
#else
@@ -319,7 +319,7 @@ class AsyncServer {
319319
AsyncServer(ip_addr_t addr, uint16_t port);
320320
#ifdef ARDUINO
321321
AsyncServer(IPAddress addr, uint16_t port);
322-
#if ESP_IDF_VERSION_MAJOR < 5
322+
#if __has_include(<IPv6Address.h>)
323323
AsyncServer(IPv6Address addr, uint16_t port);
324324
#endif
325325
#endif

0 commit comments

Comments
 (0)