ports/devel/ice/files/patch-cpp-src-Ice-Network.cpp
Boris Samorodov c1436fa4e5 Changes from the PR:
. fix built using Clang in C++11 mode and libc++ (-std=c++11
-stdlib=libc++);
. incorporate a patch that fixes an assert bug in IceStrom;
. adopt new-style options;

While I'm here:
. adopt new-style headers;
. remove indefinite article form COMMENT;
. remove library versions from LIB_DEPENDS.

PR:		ports/171643
Submitted by:	Michael Gmelin <freebsd@grem.de> (maintainer)
2012-09-23 14:45:33 +00:00

24 lines
876 B
C++

--- cpp.orig/src/Ice/Network.cpp 2011-06-15 21:43:58.000000000 +0200
+++ cpp/src/Ice/Network.cpp 2012-09-10 11:43:58.000000000 +0200
@@ -715,7 +715,11 @@
WSASetLastError(error);
#else
int error = errno;
- if(close(fd) == SOCKET_ERROR)
+ if(close(fd) == SOCKET_ERROR
+# if defined(__FreeBSD__)
+ && getSocketErrno() != ECONNRESET
+# endif
+ )
{
SocketException ex(__FILE__, __LINE__);
ex.error = getSocketErrno();
@@ -1098,7 +1098,7 @@ IceInternal::doBind(SOCKET fd, const struct sockaddr_storage& addr)
size = 0; // Keep the compiler happy.
}
- if(bind(fd, reinterpret_cast<const struct sockaddr*>(&addr), size) == SOCKET_ERROR)
+ if(::bind(fd, reinterpret_cast<const struct sockaddr*>(&addr), size) == SOCKET_ERROR)
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);