Skip to content

Commit a385de9

Browse files
JAndrassyfacchinm
authored andcommitted
IPAddress - Ethernet library compatibility fixes
1 parent ee8bce8 commit a385de9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: api/IPAddress.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ size_t IPAddress::printTo(Print& p) const
116116
return n;
117117
}
118118

119-
const IPAddress INADDR_NONE(0,0,0,0);
119+
const IPAddress arduino::INADDR_NONE(0,0,0,0);

Diff for: api/IPAddress.h

+9-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
#include "Printable.h"
2424
#include "String.h"
2525

26+
// forward declartions of global name space friend classes
27+
class EthernetClass;
28+
class DhcpClass;
29+
class DNSClient;
30+
2631
namespace arduino {
2732

2833
// A class to make it easier to handle and pass around IP addresses
@@ -67,12 +72,13 @@ class IPAddress : public Printable {
6772

6873
virtual size_t printTo(Print& p) const;
6974

70-
friend class EthernetClass;
7175
friend class UDP;
7276
friend class Client;
7377
friend class Server;
74-
friend class DhcpClass;
75-
friend class DNSClient;
78+
79+
friend ::EthernetClass;
80+
friend ::DhcpClass;
81+
friend ::DNSClient;
7682
};
7783

7884
extern const IPAddress INADDR_NONE;

0 commit comments

Comments
 (0)