summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rwxr-xr-xextra/CMakeLists.txt3
-rw-r--r--extra/resolveip.c14
2 files changed, 11 insertions, 6 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index a909bc93820..c1477e41a81 100755
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -44,6 +44,9 @@ TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock3
ADD_EXECUTABLE(perror perror.c)
TARGET_LINK_LIBRARIES(perror strings mysys debug dbug wsock32)
+ADD_EXECUTABLE(resolveip resolveip.c)
+TARGET_LINK_LIBRARIES(resolveip strings mysys debug dbug wsock32)
+
ADD_EXECUTABLE(replace replace.c)
TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32)
diff --git a/extra/resolveip.c b/extra/resolveip.c
index 1061cafe380..b48a782c9c9 100644
--- a/extra/resolveip.c
+++ b/extra/resolveip.c
@@ -21,13 +21,15 @@
#include <m_ctype.h>
#include <my_sys.h>
#include <m_string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifndef HAVE_BROKEN_NETINET_INCLUDES
-#include <netinet/in.h>
+#ifndef WIN32
+# include <sys/types.h>
+# include <sys/socket.h>
+# ifndef HAVE_BROKEN_NETINET_INCLUDES
+# include <netinet/in.h>
+# endif
+# include <arpa/inet.h>
+# include <netdb.h>
#endif
-#include <arpa/inet.h>
-#include <netdb.h>
#include <my_net.h>
#include <my_getopt.h>