mirror of
https://github.com/esphome/esphome.git
synced 2025-03-16 21:45:17 +01:00
Fix socket abstraction for ESP-IDF v4 (#2434)
This commit is contained in:
parent
c83ecf764d
commit
46b4c970d1
1 changed files with 6 additions and 0 deletions
|
@ -96,6 +96,9 @@ class BSDSocketImpl : public Socket {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
#elif defined(ARDUINO_ARCH_ESP32)
|
||||||
|
// ESP-IDF v4 only has symbol lwip_readv
|
||||||
|
return ::lwip_readv(fd_, iov, iovcnt);
|
||||||
#else
|
#else
|
||||||
return ::readv(fd_, iov, iovcnt);
|
return ::readv(fd_, iov, iovcnt);
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,6 +123,9 @@ class BSDSocketImpl : public Socket {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
#elif defined(ARDUINO_ARCH_ESP32)
|
||||||
|
// ESP-IDF v4 only has symbol lwip_writev
|
||||||
|
return ::lwip_writev(fd_, iov, iovcnt);
|
||||||
#else
|
#else
|
||||||
return ::writev(fd_, iov, iovcnt);
|
return ::writev(fd_, iov, iovcnt);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue