Fork of NTPClient from ST, modified to work with GCC and Mbed OS5
Fork of NTPClient by
Diff: NTPClient.cpp
- Revision:
- 8:0b96fbd7cfca
- Parent:
- 6:510bffa8b3d9
--- a/NTPClient.cpp Tue Jan 03 13:28:59 2017 +0000 +++ b/NTPClient.cpp Wed Feb 15 10:48:52 2017 +0800 @@ -33,7 +33,7 @@ #define ERR(x, ...) #endif -#include "NetworkStack.h" +#include "NetworkInterface.h" #include "NTPClient.h" #include "UDPSocket.h" @@ -49,7 +49,7 @@ }*/ -NTPClient::NTPClient(NetworkStack & _m_intf) : m_intf(_m_intf) +NTPClient::NTPClient(NetworkInterface & _m_intf) : m_intf(_m_intf) { } @@ -97,7 +97,7 @@ #endif SocketAddress address(0, port); - int r = m_intf.gethostbyname(&address, host); + int r = m_intf.gethostbyname( host, &address); if (r) { printf("error: 'gethostbyname(\"%s\")' failed with code %d\r\n", host, r); } else if (!address) {