diff --git a/common/cpp/src/system_io/system_io.h b/common/cpp/src/system_io/system_io.h index 0c8813a2fe61d51ccddd90859185259103c1e032..b3a1b1bd4a2641833d777770073e42f2f8cca1d4 100644 --- a/common/cpp/src/system_io/system_io.h +++ b/common/cpp/src/system_io/system_io.h @@ -70,6 +70,8 @@ class SystemIO final : public IO { Error* err) const; void GetSubDirectoriesRecursively(const std::string& path, SubDirList* subdirs, Error* err) const; Error CreateDirectoryWithParents(const std::string& root_path, const std::string& path) const; + uint8_t* AllocateArray(uint64_t fsize, Error* err) const; + #if defined(__linux__) || defined (__APPLE__) // used to for epoll - assumed single epoll instance per class instance const int kMaxEpollEvents = 10; @@ -78,8 +80,6 @@ class SystemIO final : public IO { Error CreateEpoolIfNeeded(SocketDescriptor master_socket) const; Error ProcessNewConnection(SocketDescriptor master_socket, std::vector<std::string>* new_connections, ListSocketDescriptors* sockets_to_listen) const; - uint8_t* AllocateArray(uint64_t fsize, Error* err) const; - #endif public: ~SystemIO(); diff --git a/common/cpp/src/system_io/system_io_windows.cpp b/common/cpp/src/system_io/system_io_windows.cpp index 5c059643dbd5c58e86f25b41790199b035d1a177..88e89827e6edace160d06b935582954411c248b8 100644 --- a/common/cpp/src/system_io/system_io_windows.cpp +++ b/common/cpp/src/system_io/system_io_windows.cpp @@ -8,8 +8,6 @@ #include <fcntl.h> #include <iostream> #include <direct.h> -#include <mswsock.h> - using std::string; using std::vector; @@ -385,7 +383,7 @@ Error SystemIO::SendFile(SocketDescriptor socket_fd, const std::string& fname, s return GetLastError(); } - if (!TransmitFile(socket_fd, hFile, 0, 0, NULL, NULL, TF_USE_DEFAULT_WORKER)) { + if (!TransmitFile(socket_fd, hFile, 0, 0, NULL, NULL, 0)) { _close(hFile); return GetLastError(); }