@@ -14,13 +14,16 @@ * file. */ #include "config.h" +#define __NO_EXT_QNX + #include #include #include + #include #include #ifndef _WIN32 @@ -346,11 +349,11 @@ } - (OFTCPSocket*)accept { OFTCPSocket *newsock; - struct sockaddr *addr; + struct sockaddr_storage *addr; socklen_t addrlen; int s; newsock = [[[isa alloc] init] autorelease]; addrlen = sizeof(struct sockaddr); @@ -360,11 +363,12 @@ } @catch (id e) { [newsock release]; @throw e; } - if ((s = accept(sock, addr, &addrlen)) == INVALID_SOCKET) { + if ((s = accept(sock, (struct sockaddr*)addr, + &addrlen)) == INVALID_SOCKET) { [newsock release]; @throw [OFAcceptFailedException newWithClass: isa socket: self]; } @@ -392,12 +396,12 @@ #ifdef HAVE_THREADSAFE_GETADDRINFO char *host = [self allocMemoryWithSize: NI_MAXHOST]; @try { - if (getnameinfo(sockAddr, sockAddrLen, host, NI_MAXHOST, NULL, - 0, NI_NUMERICHOST)) + if (getnameinfo((struct sockaddr*)sockAddr, sockAddrLen, host, + NI_MAXHOST, NULL, 0, NI_NUMERICHOST)) @throw [OFAddressTranslationFailedException newWithClass: isa]; return [OFString stringWithCString: host]; } @finally {