Commit 79f0f137 authored by Christian Beier's avatar Christian Beier Committed by Johannes Schindelin

Fix MinGW32 checking for IPv6.

Signed-off-by: 's avatarChristian Beier <dontmind@freeshell.org>
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 68e7696a
...@@ -703,12 +703,22 @@ AC_ARG_WITH(ipv6, ...@@ -703,12 +703,22 @@ AC_ARG_WITH(ipv6,
[ --without-ipv6 disable IPv6 support],,) [ --without-ipv6 disable IPv6 support],,)
if test "x$with_ipv6" != "xno"; then if test "x$with_ipv6" != "xno"; then
AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(IPv6,1), AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(IPv6,1),
AC_CHECK_LIB(socket, getaddrinfo, AC_DEFINE(IPv6,1))) AC_CHECK_LIB(socket, getaddrinfo, AC_DEFINE(IPv6,1), [
AC_MSG_CHECKING([for getaddrinfo in -lws2_32])
LIBS="$LIBS -lws2_32"
AC_TRY_LINK([#include <ws2tcpip.h>], [getaddrinfo(0, 0, 0, 0);], [
AC_DEFINE(IPv6,1)
AC_MSG_RESULT([yes])
],
AC_MSG_RESULT([no]))
]))
fi fi
# Checks for header files. # Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h]) AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h ws2tcpip.h])
# x11vnc only: # x11vnc only:
if test "$build_x11vnc" = "yes"; then if test "$build_x11vnc" = "yes"; then
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#define read(sock,buf,len) recv(sock,buf,len,0) #define read(sock,buf,len) recv(sock,buf,len,0)
#define write(sock,buf,len) send(sock,buf,len,0) #define write(sock,buf,len) send(sock,buf,len,0)
#define socklen_t int #define socklen_t int
#ifdef LIBVNCSERVER_HAVE_WS2TCPIP_H
#undef socklen_t
#include <ws2tcpip.h>
#endif
#else #else
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment