@@ -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; }