2009-07-28 11:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/rtl/hbsocket.c
    % small improvement in INET6 broadcast address initialization
      enabled for all *nix builds, tested only with Linux and SunOS.
This commit is contained in:
Przemyslaw Czerpak
2009-07-28 09:46:00 +00:00
parent 8b0a2e6ba8
commit 4cef2a48c4
2 changed files with 13 additions and 0 deletions

View File

@@ -17,6 +17,11 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-07-28 11:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/hbsocket.c
% small improvement in INET6 broadcast address initialization
enabled for all *nix builds, tested only with Linux and SunOS.
2009-07-28 10:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/hbsocket.c
! fixed timeout updating in non Linux builds

View File

@@ -80,6 +80,9 @@
platform supports getaddrinfo()/freeaddrinfo() functions:
#define HB_HAS_ADDRINFO
platform supports constant inet6 addresses in6addr_any and in6addr_loopback:
#define HB_HAS_INET6_ADDR_CONST
platform supports IP6 protocol:
#define HB_HAS_INET6
@@ -117,6 +120,7 @@
# define HB_HAS_INET6
# define HB_HAS_SOCKADDR_STORAGE
# define HB_HAS_ADDRINFO
# define HB_HAS_INET6_ADDR_CONST
# endif
# if defined( HB_OS_LINUX )
# define HB_HAS_SELECT_TIMER
@@ -2294,8 +2298,12 @@ int hb_socketSetMulticast( HB_SOCKET_T sd, int af, const char * szAddr )
int err = inet_pton( AF_INET6, szAddr, &mreq.ipv6mr_multiaddr );
if( err > 0 )
{
#if defined( HB_HAS_INET6_ADDR_CONST )
memcpy( &mreq.ipv6mr_interface, &in6addr_any, sizeof( struct in6_addr ) );
#else
const struct in6_addr ia = IN6ADDR_ANY_INIT;
memcpy( &mreq.ipv6mr_interface, &ia, sizeof( struct in6_addr ) );
#endif
return setsockopt( sd, IPPROTO_IPV6, IPV6_JOIN_GROUP, ( const char * ) &mreq, sizeof( mreq ) );
}
else if( err == 0 )