summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-11-29 00:26:07 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-11-29 00:26:07 +0000
commitb4371466d465f9d67c776d52fbe83122848196bf (patch)
treea12b457297a89204044150c21291361875cdedff
parent7bd83c2e33c2e4723fea13cfd4199b3fa30e6b73 (diff)
downloadc-ares-b4371466d465f9d67c776d52fbe83122848196bf.tar.gz
c-ares-b4371466d465f9d67c776d52fbe83122848196bf.tar.bz2
c-ares-b4371466d465f9d67c776d52fbe83122848196bf.zip
Make sure sys/socket.h is included before netinet/in.h (required by
OpenWatcom C)
-rw-r--r--ares.h2
-rw-r--r--ares_expand_name.c3
-rw-r--r--ares_expand_string.c3
-rw-r--r--ares_mkquery.c3
-rw-r--r--ares_query.c3
-rw-r--r--ares_send.c3
6 files changed, 16 insertions, 1 deletions
diff --git a/ares.h b/ares.h
index 7ea7054..e2c7f4c 100644
--- a/ares.h
+++ b/ares.h
@@ -51,8 +51,8 @@
# include <winsock2.h>
# include <ws2tcpip.h>
#else
- #include <netinet/in.h>
#include <sys/socket.h>
+ #include <netinet/in.h>
#endif
#ifdef __cplusplus
diff --git a/ares_expand_name.c b/ares_expand_name.c
index dc5b107..8a9d822 100644
--- a/ares_expand_name.c
+++ b/ares_expand_name.c
@@ -17,6 +17,9 @@
#include "setup.h"
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
diff --git a/ares_expand_string.c b/ares_expand_string.c
index ead60a4..f2d4f74 100644
--- a/ares_expand_string.c
+++ b/ares_expand_string.c
@@ -17,6 +17,9 @@
#include "setup.h"
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
diff --git a/ares_mkquery.c b/ares_mkquery.c
index a9c9187..27ec1ee 100644
--- a/ares_mkquery.c
+++ b/ares_mkquery.c
@@ -17,6 +17,9 @@
#include "setup.h"
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
diff --git a/ares_query.c b/ares_query.c
index 14a0d66..0d1f036 100644
--- a/ares_query.c
+++ b/ares_query.c
@@ -17,6 +17,9 @@
#include "setup.h"
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
diff --git a/ares_send.c b/ares_send.c
index be5478d..54e4861 100644
--- a/ares_send.c
+++ b/ares_send.c
@@ -17,6 +17,9 @@
#include "setup.h"
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif