diff --git a/src/d_fft_fftsg.c b/src/d_fft_fftsg.c
index 22d14bc..04cd7aa 100644
--- a/src/d_fft_fftsg.c
+++ b/src/d_fft_fftsg.c
@@ -21,6 +21,8 @@ for another, more permissive-sounding copyright notice.  -MSP
 /* ---------- Pd interface to OOURA FFT; imitate Mayer API ---------- */
 #include "m_pd.h"

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER
diff --git a/src/x_array.c b/src/x_array.c
index 6a9e2eb..1ee1694 100644
--- a/src/x_array.c
+++ b/src/x_array.c
@@ -16,6 +16,8 @@
 #endif
 extern t_pd *newest;    /* OK - this should go into a .h file now :) */

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER
diff --git a/src/x_list.c b/src/x_list.c
index 8b84f18..b148dcc 100644
--- a/src/x_list.c
+++ b/src/x_list.c
@@ -5,6 +5,8 @@
 #include "m_pd.h"
 /* #include <string.h> */

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER
diff --git a/src/x_text.c b/src/x_text.c
index 852dbc8..5df8bf8 100644
--- a/src/x_text.c
+++ b/src/x_text.c
@@ -19,6 +19,8 @@ moment it also defines "text" but it may later be better to split this off. */
 extern t_pd *newest;    /* OK - this should go into a .h file now :) */
 static t_class *text_define_class;

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER

Add mingw patch for pure-data

Add mingw patch for pure-data


--- ../src-base/minecraft/net/minecraft/src/IntegratedServerListenThread.java
+++ ../src-work/minecraft/net/minecraft/src/IntegratedServerListenThread.java
@@ -4,6 +4,12 @@
 import cpw.mods.fml.common.asm.SideOnly;
 import java.io.IOException;
 import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.Collections;
+
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+
 import net.minecraft.server.MinecraftServer;

 @SideOnly(Side.CLIENT)
@@ -48,7 +54,32 @@

             try
             {
-                this.field_71757_g = new ServerListenThread(this, InetAddress.getLocalHost(), var1);
+                InetAddress add = null;
+                NetworkInterface notLocal = null;
+                for (NetworkInterface ni : Collections.list(NetworkInterface.getNetworkInterfaces()))
+                {
+                    if (!ni.isLoopback() && ni.isUp())
+                    {
+                        notLocal = ni;
+                        break;
+                    }
+                }
+                if (notLocal != null)
+                {
+                    for (InetAddress inadd : Collections.list(notLocal.getInetAddresses()))
+                    {
+                        if (inadd.getAddress().length == 4)
+                        {
+                            add = inadd;
+                            break;
+                        }
+                    }
+                }
+                if (add == null)
+                {
+                    add = InetAddress.getLocalHost();
+                }
+                this.field_71757_g = new ServerListenThread(this, add, var1);
                 this.field_71757_g.start();
             }
             catch (IOException var3)

Fix LAN to try hard to find a real network interface, not just localhost most of the time


--- ../src-base/minecraft/net/minecraft/util/ObjectIntIdentityMap.java
+++ ../src-work/minecraft/net/minecraft/util/ObjectIntIdentityMap.java
@@ -2,20 +2,21 @@

 import com.google.common.base.Predicates;
 import com.google.common.collect.Iterators;
-import gnu.trove.map.hash.TIntIntHashMap;
 import java.util.ArrayList;
+import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;

 public class ObjectIntIdentityMap implements IObjectIntIterable
 {
-    protected TIntIntHashMap field_148749_a = new TIntIntHashMap(256, 0.5F, -1, -1);
+    protected Map<Object, Integer> field_148749_a = new IdentityHashMap<Object, Integer>(512);
     protected List field_148748_b = new ArrayList();
     private static final String __OBFID = "CL_00001203";

     public void func_148746_a(Object p_148746_1_, int p_148746_2_)
     {
-        this.field_148749_a.put(System.identityHashCode(p_148746_1_), p_148746_2_);
+        this.field_148749_a.put(p_148746_1_, p_148746_2_);

         while (this.field_148748_b.size() <= p_148746_2_)
         {
@@ -27,7 +28,8 @@

     public int func_148747_b(Object p_148747_1_)
     {
-        return this.field_148749_a.get(System.identityHashCode(p_148747_1_));
+        Integer ret = this.field_148749_a.get(p_148747_1_);
+        return ret != null ? ret : -1;
     }

     public Object func_148745_a(int p_148745_1_)

Fix ObjectIntIdentityMap sporadically matching non-identical objects.