Fixes compilation on kfreebsd.
Fixes debian bug #626313. Thanks to Rhonda for testing the patch.
This commit is contained in:
parent
3ce7e68e92
commit
98e3c08f53
2 changed files with 22 additions and 13 deletions
|
@ -66,6 +66,7 @@ Version 1.9.6+svn:
|
|||
* split optional comma-separated defines list from --preprocess= (or -p=)
|
||||
to --preprocess-defines= option
|
||||
* dropped --log alias for --log-error
|
||||
* Fixed: Compilation on kfreebsd (Debian bug #626313)
|
||||
|
||||
Version 1.9.6:
|
||||
* Campaigns:
|
||||
|
|
|
@ -450,20 +450,28 @@ static SOCKET_STATE send_buffer(TCPsocket sock, std::vector<char>& buf, int in_s
|
|||
}
|
||||
|
||||
#ifdef HAVE_SENDFILE
|
||||
struct cork_setter {
|
||||
cork_setter(int socket) : cork_(1), socket_(socket)
|
||||
|
||||
#ifdef TCP_CORK
|
||||
struct cork_setter {
|
||||
cork_setter(int socket) : cork_(1), socket_(socket)
|
||||
{
|
||||
setsockopt(socket_, IPPROTO_TCP, TCP_CORK, &cork_, sizeof(cork_));;
|
||||
}
|
||||
~cork_setter()
|
||||
{
|
||||
cork_ = 0;
|
||||
setsockopt(socket_, IPPROTO_TCP, TCP_CORK, &cork_, sizeof(cork_));
|
||||
}
|
||||
private:
|
||||
int cork_;
|
||||
int socket_;
|
||||
};
|
||||
#else
|
||||
struct cork_setter
|
||||
{
|
||||
setsockopt(socket_, IPPROTO_TCP, TCP_CORK, &cork_, sizeof(cork_));;
|
||||
}
|
||||
~cork_setter()
|
||||
{
|
||||
cork_ = 0;
|
||||
setsockopt(socket_, IPPROTO_TCP, TCP_CORK, &cork_, sizeof(cork_));
|
||||
}
|
||||
private:
|
||||
int cork_;
|
||||
int socket_;
|
||||
};
|
||||
cork_setter(int) {}
|
||||
};
|
||||
#endif
|
||||
|
||||
struct close_fd {
|
||||
void operator()(int fd) const { close(fd); }
|
||||
|
|
Loading…
Add table
Reference in a new issue