Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -684,11 +684,12 @@ errNo: (int *)errNo { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; - if (connect(_socket, &address->sockaddr.sockaddr, + /* Cast needed for AmigaOS, where the argument is declared non-const */ + if (connect(_socket, (struct sockaddr *)&address->sockaddr.sockaddr, address->length) != 0) { *errNo = of_socket_errno(); return false; } Index: src/exceptions/OFConnectionFailedException.m ================================================================== --- src/exceptions/OFConnectionFailedException.m +++ src/exceptions/OFConnectionFailedException.m @@ -29,29 +29,29 @@ OF_UNRECOGNIZED_SELECTOR } + (instancetype)exceptionWithHost: (OFString *)host port: (uint16_t)port - socket: (id)socket + socket: (id)sock errNo: (int)errNo { return [[[self alloc] initWithHost: host port: port - socket: socket + socket: sock errNo: errNo] autorelease]; } + (instancetype)exceptionWithNode: (unsigned char [IPX_NODE_LEN])node network: (uint32_t)network port: (uint16_t)port - socket: (id)socket + socket: (id)sock errNo: (int)errNo { return [[[self alloc] initWithNode: node network: network port: port - socket: socket + socket: sock errNo: errNo] autorelease]; } - (instancetype)init { @@ -58,19 +58,19 @@ OF_INVALID_INIT_METHOD } - (instancetype)initWithHost: (OFString *)host port: (uint16_t)port - socket: (id)socket + socket: (id)sock errNo: (int)errNo { self = [super init]; @try { _host = [host copy]; _port = port; - _socket = [socket retain]; + _socket = [sock retain]; _errNo = errNo; } @catch (id e) { [self release]; @throw e; } @@ -79,20 +79,20 @@ } - (instancetype)initWithNode: (unsigned char [IPX_NODE_LEN])node network: (uint32_t)network port: (uint16_t)port - socket: (id)socket + socket: (id)sock errNo: (int)errNo { self = [super init]; @try { memcpy(_node, node, IPX_NODE_LEN); _network = network; _port = port; - _socket = [socket retain]; + _socket = [sock retain]; _errNo = errNo; } @catch (id e) { [self release]; @throw e; }