@@ -383,11 +383,11 @@ @throw [OFBindFailedException exceptionWithHost: host port: port socket: self]; if (setsockopt(_socket, SOL_SOCKET, SO_REUSEADDR, - (const char*)&one, sizeof(one))) + (const char*)&one, (socklen_t)sizeof(one))) @throw [OFSetOptionFailedException exceptionWithStream: self]; if (bind(_socket, results[0]->address, results[0]->addressLength) == -1) { @@ -403,11 +403,11 @@ if (port > 0) return port; #ifndef __wii__ - addrLen = sizeof(addr.storage); + addrLen = (socklen_t)sizeof(addr.storage); if (getsockname(_socket, (struct sockaddr*)&addr.storage, &addrLen)) { close(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port @@ -450,11 +450,11 @@ { OFTCPSocket *client = [[[[self class] alloc] init] autorelease]; client->_address = [client allocMemoryWithSize: sizeof(struct sockaddr_storage)]; - client->_addressLength = sizeof(struct sockaddr_storage); + client->_addressLength = (socklen_t)sizeof(struct sockaddr_storage); if ((client->_socket = accept(_socket, client->_address, &client->_addressLength)) == INVALID_SOCKET) @throw [OFAcceptFailedException exceptionWithSocket: self]; @@ -491,11 +491,12 @@ - (void)setKeepAlivesEnabled: (bool)enable { int v = enable; - if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, sizeof(v))) + if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, + (char*)&v, (socklen_t)sizeof(v))) @throw [OFSetOptionFailedException exceptionWithStream: self]; } - (OFString*)remoteAddress {