Added <sys/time.h> and changed the declaration to struct timeval, fixing portability on Alpine/musl
Some checks failed
Build & Upload tux-dock / build (push) Has been cancelled
Some checks failed
Build & Upload tux-dock / build (push) Has been cancelled
This commit is contained in:
parent
c7e701b0c0
commit
8abf861e18
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <cstring>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sstream>
|
||||
|
|
@ -55,7 +56,7 @@ EngineResponse DockerEngineClient::request(const std::string& method,
|
|||
return response;
|
||||
}
|
||||
|
||||
timeval timeout{};
|
||||
struct timeval timeout{};
|
||||
timeout.tv_sec = 10;
|
||||
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout));
|
||||
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue