#include "includes.h"
#include "system/filesys.h"
+#include "lib/util/sys_rw.h"
/* Do this on our own in TRANSFER_BUF_SIZE chunks.
* It's safe to make direct syscalls to lseek/write here
read_ret = read(fromfd, buffer, toread);
} while (read_ret == -1 && errno == EINTR);
-#if defined(EWOULDBLOCK)
if (read_ret == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) {
-#else
- if (read_ret == -1 && (errno == EAGAIN)) {
-#endif
/*
* fromfd socket is in non-blocking mode.
* If we already read some and wrote
return default_sys_recvfile(fromfd, tofd,
offset, count);
}
-#if defined(EWOULDBLOCK)
if (errno == EAGAIN || errno == EWOULDBLOCK) {
-#else
- if (errno == EAGAIN) {
-#endif
/*
* fromfd socket is in non-blocking mode.
* If we already read some and wrote