Commit 105395ad by Mohan Embar Committed by Mohan Embar

natPlainSocketImplPosix.cc (bind): Clear SockAddr before using - needed for OS X/PPC.

2006-07-21  Mohan Embar  <gnustuff@thisiscool.com>

	* gnu/java/net/natPlainSocketImplPosix.cc (bind): Clear
	SockAddr before using - needed for OS X/PPC.

From-SVN: r115669
parent eb1ff706
2006-07-21 Mohan Embar <gnustuff@thisiscool.com>
* gnu/java/net/natPlainSocketImplPosix.cc (bind): Clear
SockAddr before using - needed for OS X/PPC.
2006-07-21 Keith Seitz <keiths@redhat.com> 2006-07-21 Keith Seitz <keiths@redhat.com>
* boehm.cc (_Jv_SuspendThread): Don't ifdef the function declaration, * boehm.cc (_Jv_SuspendThread): Don't ifdef the function declaration,
......
...@@ -89,6 +89,11 @@ gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lpor ...@@ -89,6 +89,11 @@ gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lpor
int len = haddress->length; int len = haddress->length;
int i = 1; int i = 1;
// The following is needed for OS X/PPC, otherwise bind() fails with an
// error. I found the issue and following fix on some mailing list, but
// no explanation was given as to why this solved the problem.
memset (&u, 0, sizeof (u));
if (len == 4) if (len == 4)
{ {
u.address.sin_family = AF_INET; u.address.sin_family = AF_INET;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment