Browse Source

Use the c-ares pton/ntop hack in node_net.cc as well

v0.7.4-release
Bert Belder 14 years ago
parent
commit
6e522fb27b
  1. 7
      src/node_cares.cc
  2. 15
      src/node_net.cc

7
src/node_cares.cc

@ -24,8 +24,11 @@
# endif # endif
#endif // __OpenBSD__ #endif // __OpenBSD__
/* HACK to use inet_pton/inet_ntop from c-ares because mingw32 doesn't have it /* /*
/* TODO fixme */ * HACK to use inet_pton/inet_ntop from c-ares because mingw32 doesn't have it /*
* This trick is used in node_net.cc as well
* TODO fixme
*/
#ifdef __MINGW32__ #ifdef __MINGW32__
extern "C" { extern "C" {
# include <inet_net_pton.h> # include <inet_net_pton.h>

15
src/node_net.cc

@ -40,6 +40,21 @@
#include <sys/uio.h> #include <sys/uio.h>
#endif #endif
/*
* HACK to use inet_pton/inet_ntop from c-ares because mingw32 doesn't have it /*
* This trick is used in node_ares.cc as well
* 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
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a))) #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))

Loading…
Cancel
Save