Mingw32 has no inet_pton/inet_ntop; import them from c-ares (hack)
authorBert Belder <bertbelder@gmail.com>
Thu, 25 Nov 2010 00:41:28 +0000 (01:41 +0100)
committerBert Belder <bertbelder@gmail.com>
Mon, 20 Dec 2010 22:50:45 +0000 (23:50 +0100)
src/node_cares.cc

index bdfb31a..d7d5884 100644 (file)
 # endif
 #endif  // __OpenBSD__
 
+/* HACK to use inet_pton/inet_ntop from c-ares because mingw32 doesn't have it /*
+/* TODO fixme */
+#ifdef __MINGW32__
+  extern "C" {
+#   include <inet_net_pton.h>
+#   include <inet_ntop.h>
+  }
+
+# define inet_pton ares_inet_pton
+# define inet_ntop ares_inet_ntop
+#endif
+
 namespace node {
 
 using namespace v8;