Skip to content
Snippets Groups Projects
Commit a3781294 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix windows

parent 20ed827a
No related branches found
No related tags found
No related merge requests found
...@@ -70,6 +70,8 @@ class SystemIO final : public IO { ...@@ -70,6 +70,8 @@ class SystemIO final : public IO {
Error* err) const; Error* err) const;
void GetSubDirectoriesRecursively(const std::string& path, SubDirList* subdirs, 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; 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__) #if defined(__linux__) || defined (__APPLE__)
// used to for epoll - assumed single epoll instance per class instance // used to for epoll - assumed single epoll instance per class instance
const int kMaxEpollEvents = 10; const int kMaxEpollEvents = 10;
...@@ -78,8 +80,6 @@ class SystemIO final : public IO { ...@@ -78,8 +80,6 @@ class SystemIO final : public IO {
Error CreateEpoolIfNeeded(SocketDescriptor master_socket) const; Error CreateEpoolIfNeeded(SocketDescriptor master_socket) const;
Error ProcessNewConnection(SocketDescriptor master_socket, std::vector<std::string>* new_connections, Error ProcessNewConnection(SocketDescriptor master_socket, std::vector<std::string>* new_connections,
ListSocketDescriptors* sockets_to_listen) const; ListSocketDescriptors* sockets_to_listen) const;
uint8_t* AllocateArray(uint64_t fsize, Error* err) const;
#endif #endif
public: public:
~SystemIO(); ~SystemIO();
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <iostream> #include <iostream>
#include <direct.h> #include <direct.h>
#include <mswsock.h>
using std::string; using std::string;
using std::vector; using std::vector;
...@@ -385,7 +383,7 @@ Error SystemIO::SendFile(SocketDescriptor socket_fd, const std::string& fname, s ...@@ -385,7 +383,7 @@ Error SystemIO::SendFile(SocketDescriptor socket_fd, const std::string& fname, s
return GetLastError(); 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); _close(hFile);
return GetLastError(); return GetLastError();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment