Fix socket abstraction for ESP-IDF v4 (#2434)

This commit is contained in:
Stefan Agner 2021-10-03 22:21:45 +02:00 committed by GitHub
parent c83ecf764d
commit 46b4c970d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -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