diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Makefile.am | 2 | ||||
-rw-r--r-- | common/arch.h | 2 | ||||
-rw-r--r-- | common/os_calls.c | 10 |
3 files changed, 9 insertions, 5 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index 8224c52d..c8501586 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = \ xrdp_rail.h \ crc16.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ diff --git a/common/arch.h b/common/arch.h index 14ab9d7d..d3ae460e 100644 --- a/common/arch.h +++ b/common/arch.h @@ -22,7 +22,7 @@ /* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN in the makefile to override */ -/* check endianess */ +/* check endianness */ #if !(defined(L_ENDIAN) || defined(B_ENDIAN)) #if !defined(__BYTE_ORDER) && defined(__linux__) #include <endian.h> diff --git a/common/os_calls.c b/common/os_calls.c index 6a8bf136..0034cb5b 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -411,7 +411,7 @@ g_tcp_socket(void) unsigned int option_len; #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); #else rv = (int)socket(AF_INET, SOCK_STREAM, 0); @@ -420,14 +420,18 @@ g_tcp_socket(void) { return -1; } -#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6) +#if defined(XRDP_ENABLE_IPV6) option_len = sizeof(option_value); if (getsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value, &option_len) == 0) { if (option_value != 0) { +#if defined(XRDP_ENABLE_IPV6ONLY) + option_value = 1; +#else option_value = 0; +#endif option_len = sizeof(option_value); if (setsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value, option_len) < 0) @@ -659,7 +663,7 @@ g_sck_close(int sck) /*****************************************************************************/ /* returns error, zero is good */ -#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6) +#if defined(XRDP_ENABLE_IPV6) int APP_CC g_tcp_connect(int sck, const char *address, const char *port) { |