[PATCH] Fix testsuite failure 117

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Fix testsuite failure 117

Paolo Bonzini-2
This was visible on Michael Fellinger's machine.  Thanks to him for
providing me an account!

I'm reversing the previous attempted fix from the stable branch because
it's too intrusive.  I can always get it back later if it turns out to
be a real problem.

Paolo

diff --git a/packages/tcp/tcp.c b/packages/tcp/tcp.c
index c75157b..dee4ce9 100644
--- a/packages/tcp/tcp.c
+++ b/packages/tcp/tcp.c
@@ -211,7 +211,15 @@ getAnyLocalAddress (char *name, char *whereToPut)
    struct hostent *hostEnt;

    hostEnt = gethostbyname (name);
-  memcpy (whereToPut, hostEnt->h_addr, 4);
+  if (hostEnt)
+    memcpy (whereToPut, hostEnt->h_addr, 4);
+  else
+    {
+      whereToPut[0] = 127;
+      whereToPut[1] = 0;
+      whereToPut[2] = 0;
+      whereToPut[3] = 1;
+    }
  }

  #define constantFunction(name, constant) \


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk