common: drop ipv6 autodetection only valid for linux

ulab-next-nosound
Koichiro IWAO 10 years ago
parent f8432d0bb7
commit 5bc0453605

@ -463,7 +463,7 @@ g_tcp_socket(void)
unsigned int option_len; unsigned int option_len;
#endif #endif
#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6) #if defined(XRDP_ENABLE_IPV6)
rv = (int)socket(AF_INET6, SOCK_STREAM, 0); rv = (int)socket(AF_INET6, SOCK_STREAM, 0);
#else #else
rv = (int)socket(AF_INET, SOCK_STREAM, 0); rv = (int)socket(AF_INET, SOCK_STREAM, 0);
@ -472,7 +472,7 @@ g_tcp_socket(void)
{ {
return -1; return -1;
} }
#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6) #if defined(XRDP_ENABLE_IPV6)
option_len = sizeof(option_value); option_len = sizeof(option_value);
if (getsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value, if (getsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value,
&option_len) == 0) &option_len) == 0)
@ -711,7 +711,7 @@ g_tcp_close(int sck)
/*****************************************************************************/ /*****************************************************************************/
/* returns error, zero is good */ /* returns error, zero is good */
#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6) #if defined(XRDP_ENABLE_IPV6)
int APP_CC int APP_CC
g_tcp_connect(int sck, const char *address, const char *port) g_tcp_connect(int sck, const char *address, const char *port)
{ {

@ -111,11 +111,6 @@ then
AC_DEFINE([XRDP_ENABLE_IPV6],1,[Enable IPv6]) AC_DEFINE([XRDP_ENABLE_IPV6],1,[Enable IPv6])
fi fi
AC_CHECK_MEMBER([struct in6_addr.s6_addr],
[],
[AC_DEFINE(NO_ARPA_INET_H_IP6, 1, [for IPv6])],
[#include <arpa/inet.h>])
if test "x$enable_pam" != "xyes" || test "x$bsd" = "xtrue" if test "x$enable_pam" != "xyes" || test "x$bsd" = "xtrue"
then then
AC_DEFINE([USE_NOPAM],1,[Disable PAM]) AC_DEFINE([USE_NOPAM],1,[Disable PAM])

Loading…
Cancel
Save