This fixes the test suite on macOS, which has a lo0 interface with an MTU
of 16384, which is smaller than the maximum packet size we could send.
+ size_t readsize = datagram ? 1460u : sizeof(buf);
fd_set fds;
FD_ZERO(&fds);
fd_set fds;
FD_ZERO(&fds);
}
if(FD_ISSET(in, &fds)) {
}
if(FD_ISSET(in, &fds)) {
- ssize_t len = read(in, buf, sizeof(buf));
+ ssize_t len = read(in, buf, readsize);
if(len < 0) {
fprintf(stderr, "Could not read from stdin: %s\n", strerror(errno));
if(len < 0) {
fprintf(stderr, "Could not read from stdin: %s\n", strerror(errno));