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:
Mathieu Rene 2010-02-22 19:18:11 +00:00
parent 4197a25412
commit 2c7cb1da6b

View File

@ -386,12 +386,16 @@ static int sock_setup(esl_handle_t *handle)
} }
#ifdef WIN32 #ifdef WIN32
BOOL bOptVal = TRUE; {
int bOptLen = sizeof(BOOL); BOOL bOptVal = TRUE;
setsockopt(handle->sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&bOptVal, bOptLen); int bOptLen = sizeof(BOOL);
setsockopt(handle->sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&bOptVal, bOptLen);
}
#else #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 #endif
return ESL_SUCCESS; return ESL_SUCCESS;