Index: src/OFSCTPSocket.m ================================================================== --- src/OFSCTPSocket.m +++ src/OFSCTPSocket.m @@ -89,11 +89,13 @@ errNo: (int *)errNo { #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) int flags; #endif +#ifdef SCTP_RECVRCVINFO int one = 1; +#endif if (_socket != OFInvalidSocketHandle) @throw [OFAlreadyOpenException exceptionWithObject: self]; if ((_socket = socket( @@ -107,19 +109,21 @@ #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif +#ifdef SCTP_RECVRCVINFO if (setsockopt(_socket, IPPROTO_SCTP, SCTP_RECVRCVINFO, &one, sizeof(one)) != 0) { *errNo = _OFSocketErrNo(); closesocket(_socket); _socket = OFInvalidSocketHandle; return false; } +#endif return true; } - (bool)of_connectSocketToAddress: (const OFSocketAddress *)address @@ -321,11 +325,11 @@ objc_autoreleasePoolPop(pool); return address; } - +#ifdef SCTP_RECVRCVINFO - (instancetype)accept { OFSCTPSocket *accepted = [super accept]; int one = 1; @@ -335,10 +339,11 @@ exceptionWithSocket: self errNo: _OFSocketErrNo()]; return accepted; } +#endif - (size_t)receiveIntoBuffer: (void *)buffer length: (size_t)length { return [self receiveIntoBuffer: buffer length: length