Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -757,11 +757,12 @@ - (int)of_socketError { int errNo; socklen_t len = sizeof(errNo); - if (getsockopt(_socket, SOL_SOCKET, SO_ERROR, &errNo, &len) != 0) + if (getsockopt(_socket, SOL_SOCKET, SO_ERROR, (char *)&errNo, + &len) != 0) return of_socket_errno(); return errNo; } @@ -988,18 +989,18 @@ @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: EAFNOSUPPORT]; } -#endif - +#else closesocket(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: EADDRNOTAVAIL]; +#endif } - (void)listen { [self listenWithBacklog: SOMAXCONN]; Index: src/OFUDPSocket.m ================================================================== --- src/OFUDPSocket.m +++ src/OFUDPSocket.m @@ -238,20 +238,20 @@ @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: EAFNOSUPPORT]; } -#endif - +#else closesocket(_socket); _socket = INVALID_SOCKET; host = of_socket_address_ip_string(address, &port); @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: EADDRNOTAVAIL]; +#endif } - (uint16_t)bindToHost: (OFString *)host port: (uint16_t)port { Index: src/OFWindowsRegistryKey.m ================================================================== --- src/OFWindowsRegistryKey.m +++ src/OFWindowsRegistryKey.m @@ -15,13 +15,13 @@ * file. */ #include "config.h" -#include - #import "OFWindowsRegistryKey.h" + +#include #import "OFCreateWindowsRegistryKeyFailedException.h" #import "OFOpenWindowsRegistryKeyFailedException.h" #import "OFReadWindowsRegistryValueFailedException.h"