Replacing SOL_IP and SOL_TCP by the more portable IPPROTO_IP and
IPPROTO_TCP. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2530 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -182,7 +182,7 @@ Socket_setNodelay(Socket *sock) {
|
||||
// IPTOS_RELIABILITY, or IPTOS_MINCOST.
|
||||
int
|
||||
Socket_setTOS(Socket *sock, int tos) {
|
||||
if (setsockopt(sock->fd, SOL_IP, IP_TOS, &tos, sizeof tos) == -1) {
|
||||
if (setsockopt(sock->fd, IPPROTO_IP, IP_TOS, &tos, sizeof tos) == -1) {
|
||||
#ifdef DEBUG
|
||||
int savedErrno = errno;
|
||||
log_add(log_Warning, "Setting socket type-of-service failed: %s.\n",
|
||||
@@ -229,7 +229,7 @@ int
|
||||
Socket_setKeepAlive(Socket *sock) {
|
||||
int flag = 1;
|
||||
|
||||
if (setsockopt(sock->fd, SOL_TCP, SO_KEEPALIVE, &flag, sizeof flag)
|
||||
if (setsockopt(sock->fd, IPPROTO_TCP, SO_KEEPALIVE, &flag, sizeof flag)
|
||||
== -1) {
|
||||
int savedErrno = errno;
|
||||
log_add(log_Error, "Setting keep-alive on socket failed: %s\n",
|
||||
|
||||
Reference in New Issue
Block a user