ISO C90 forbids mixed declarations and code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16722 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4197a25412
commit
2c7cb1da6b
|
@ -386,12 +386,16 @@ static int sock_setup(esl_handle_t *handle)
|
|||
}
|
||||
|
||||
#ifdef WIN32
|
||||
BOOL bOptVal = TRUE;
|
||||
int bOptLen = sizeof(BOOL);
|
||||
setsockopt(handle->sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&bOptVal, bOptLen);
|
||||
{
|
||||
BOOL bOptVal = TRUE;
|
||||
int bOptLen = sizeof(BOOL);
|
||||
setsockopt(handle->sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&bOptVal, bOptLen);
|
||||
}
|
||||
#else
|
||||
int x = 1;
|
||||
setsockopt(handle->sock, IPPROTO_TCP, TCP_NODELAY, &x, sizeof(x));
|
||||
{
|
||||
int x = 1;
|
||||
setsockopt(handle->sock, IPPROTO_TCP, TCP_NODELAY, &x, sizeof(x));
|
||||
}
|
||||
#endif
|
||||
|
||||
return ESL_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue