python:tests: Store keys as bytes rather than as lists of ints
[samba.git] / source3 / lib / recvfile.c
index bffe07f75cd4c54fdcc79649f8f8dc8a5926b4ef..e1eb241d7bd8ce168443882d3cc7cad145cb6590 100644 (file)
@@ -25,6 +25,7 @@
 
 #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
@@ -84,11 +85,7 @@ static ssize_t default_sys_recvfile(int fromfd,
                        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
@@ -209,11 +206,7 @@ ssize_t sys_recvfile(int fromfd,
                                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