mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Just in case some systems don't have TCP_NODElAY, put that in an ifdef.
This commit is contained in:
parent
d4e074dbed
commit
ea0bb6f812
@ -625,9 +625,13 @@ static int init_tcp_connection(const struct addrinfo *res,
|
|||||||
{
|
{
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
int fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
|
int fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
|
||||||
int flag = 1;
|
|
||||||
|
|
||||||
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int));
|
#if defined(IPPROTO_TCP) && defined(TCP_NODELAY)
|
||||||
|
{
|
||||||
|
int flag = 1;
|
||||||
|
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user