aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-05 20:20:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-05 20:20:14 +0000
commiteccd0d8e37501e5daa2a9d17dc75233d76ebf262 (patch)
treea6ee9c12dafecd02438a8ba2c51b1c7ae83d6233
parent983be0ec603020d42fde3d1ed68ce941401f3fd2 (diff)
with these changes, it builds on my win32 cross-compiler
-rw-r--r--ares/inet_net_pton.c15
-rw-r--r--ares/nameser.h10
2 files changed, 22 insertions, 3 deletions
diff --git a/ares/inet_net_pton.c b/ares/inet_net_pton.c
index b61a16c85..2fa110047 100644
--- a/ares/inet_net_pton.c
+++ b/ares/inet_net_pton.c
@@ -19,10 +19,25 @@
#include <sys/types.h>
+
+#if defined(WIN32) && !defined(WATT32)
+#include "nameser.h"
+#else
+
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
+
+#endif
#include <ctype.h>
#include <errno.h>
diff --git a/ares/nameser.h b/ares/nameser.h
index f2653f127..fd496c57a 100644
--- a/ares/nameser.h
+++ b/ares/nameser.h
@@ -16,6 +16,8 @@
#define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EMSGSIZE ERANGE /* FIX: is there a better replacement? */
+#define EAFNOSUPPORT ERANGE /* FIX: is there a better replacement? */
/* Structure for scatter/gather I/O. */
struct iovec
@@ -36,8 +38,10 @@ int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
#endif /* !NETWARE */
-#define NS_CMPRSFLGS 0xc0
-
+#define NS_CMPRSFLGS 0xc0
+#define NS_IN6ADDRSZ 16
+#define NS_INT16SZ 2
+#define NS_INADDRSZ 4
/* Flag bits indicating name compression. */
#define INDIR_MASK NS_CMPRSFLGS
@@ -134,7 +138,7 @@ typedef enum __ns_opcode {
#define QUERY ns_o_query
-#define NS_MAXLABEL 63
+#define NS_MAXLABEL 63
#define MAXLABEL NS_MAXLABEL
#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */