Skip to content

Commit 0ec62c0

Browse files
author
linjiaqian
committed
修复inaddr_none重定义
1 parent 4098c53 commit 0ec62c0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cores/esp32/IPAddress.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,6 @@ esp_ip6_addr_type_t IPAddress::addr_type() const {
411411
}
412412

413413
const IPAddress IN6ADDR_ANY(IPv6);
414+
#ifndef INADDR_NONE
414415
const IPAddress INADDR_NONE(0, 0, 0, 0);
416+
#endif

cores/esp32/IPAddress.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,6 @@ class IPAddress : public Printable {
134134
};
135135

136136
extern const IPAddress IN6ADDR_ANY;
137+
#ifndef INADDR_NONE
137138
extern const IPAddress INADDR_NONE;
139+
#endif

0 commit comments

Comments
 (0)