Open rsn8887 opened 4 years ago
These calls should be quite easy to implement in a portable manner if the header is missing. Not sure how to detect whether this header is present though.
Example from https://www.oreilly.com/library/view/linux-system-programming/0596009585/ch04.html
ssize_t naive_writev(int fd, const struct iovec *iov, int count) {
ssize_t ret = 0;
int i;
for (i = 0; i < count; i++) {
ssize_t nr;
nr = write(fd, iov[i].iov_base, iov[i].iov_len);
if (nr == −1) {
ret = −1;
break;
}
ret += nr;
}
return ret;
}
Known platforms affected: PS Vita, Nintendo Switch, Nintendo 3DS (all newlib-based homebrew environments).
See title and here https://github.com/chriskohlhoff/asio/blob/62c4488abccce5e62b0526bb3f5390f57ab3712c/asio/include/asio/detail/socket_types.hpp
Regarding sys/uio.h:
See: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_uio.h.html
Why does asio depend on such a non-portable and non-standard header? It breaks portability to many embedded platforms and others.