fixed compile error

src/NetworkSettings.cpp: In member function 'void NetworkSettingsClass::setHostname()':
src/NetworkSettings.cpp:254:42: error: no matching function for call to 'ETHClass::setHostname(String)'
         if (ETH.setHostname(getHostname())) {
                                          ^
ETH.h:83:14: note: candidate: 'bool ETHClass::setHostname(const char*)'
         bool setHostname(const char * hostname);
This commit is contained in:
Stefan Kreutter 2022-09-13 10:04:12 +02:00 committed by Thomas Basler
parent f5f38af25f
commit cb00537284

View File

@ -251,7 +251,7 @@ void NetworkSettingsClass::setHostname()
}
#ifdef OPENDTU_ETHERNET
else if (_networkMode == network_mode::Ethernet) {
if (ETH.setHostname(getHostname())) {
if (ETH.setHostname(getHostname().c_str())) {
Serial.println(F("done"));
} else {
Serial.println(F("failed"));