Skip to content

Commit

Permalink
Fix socket abstraction for ESP-IDF v4 (esphome#2434)
Browse files Browse the repository at this point in the history
  • Loading branch information
agners authored Oct 3, 2021
1 parent c83ecf7 commit 46b4c97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions esphome/components/socket/bsd_sockets_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ class BSDSocketImpl : public Socket {
break;
}
return ret;
#elif defined(ARDUINO_ARCH_ESP32)
// ESP-IDF v4 only has symbol lwip_readv
return ::lwip_readv(fd_, iov, iovcnt);
#else
return ::readv(fd_, iov, iovcnt);
#endif
Expand All @@ -120,6 +123,9 @@ class BSDSocketImpl : public Socket {
break;
}
return ret;
#elif defined(ARDUINO_ARCH_ESP32)
// ESP-IDF v4 only has symbol lwip_writev
return ::lwip_writev(fd_, iov, iovcnt);
#else
return ::writev(fd_, iov, iovcnt);
#endif
Expand Down

0 comments on commit 46b4c97

Please sign in to comment.