2015-10-12 12:56 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/rtl/hbsocket.c
    ! added casting to 2-nd parameter of inet_ntop() as workaround for
      wrong declaration inet_ntop() in MSVC header file
This commit is contained in:
Przemysław Czerpak
2015-10-12 12:56:41 +02:00
parent d5a11a9abe
commit f7b7e30c36
2 changed files with 9 additions and 4 deletions

View File

@@ -10,6 +10,11 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2015-10-12 12:56 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsocket.c
! added casting to 2-nd parameter of inet_ntop() as workaround for
wrong declaration inet_ntop() in MSVC header file
2015-10-09 13:38 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsocket.c
! fixed typo (unnecessary parenthesis) in previous commit

View File

@@ -1820,7 +1820,7 @@ char * hb_socketAddrGetName( const void * pSockAddr, unsigned len )
const char * szAddr;
# if defined( HB_HAS_INET_NTOP )
char buf[ INET_ADDRSTRLEN ];
szAddr = inet_ntop( AF_INET, &sa->sin_addr, buf, sizeof( buf ) );
szAddr = inet_ntop( AF_INET, ( void * ) &sa->sin_addr, buf, sizeof( buf ) );
# elif defined( HB_IS_INET_NTOA_MT_SAFE )
szAddr = inet_ntoa( sa->sin_addr );
# else
@@ -1840,7 +1840,7 @@ char * hb_socketAddrGetName( const void * pSockAddr, unsigned len )
const char * szAddr;
# if defined( HB_HAS_INET_NTOP )
char buf[ INET6_ADDRSTRLEN ];
szAddr = inet_ntop( AF_INET6, &sa->sin6_addr, buf, sizeof( buf ) );
szAddr = inet_ntop( AF_INET6, ( void * ) &sa->sin6_addr, buf, sizeof( buf ) );
# else
{
int iTODO;
@@ -1969,7 +1969,7 @@ PHB_ITEM hb_socketAddrToItem( const void * pSockAddr, unsigned len )
const char * szAddr;
# if defined( HB_HAS_INET_NTOP )
char buf[ INET_ADDRSTRLEN ];
szAddr = inet_ntop( AF_INET, &sa->sin_addr, buf, sizeof( buf ) );
szAddr = inet_ntop( AF_INET, ( void * ) &sa->sin_addr, buf, sizeof( buf ) );
# elif defined( HB_IS_INET_NTOA_MT_SAFE )
szAddr = inet_ntoa( sa->sin_addr );
# else
@@ -1994,7 +1994,7 @@ PHB_ITEM hb_socketAddrToItem( const void * pSockAddr, unsigned len )
const char * szAddr;
# if defined( HB_HAS_INET_NTOP )
char buf[ INET6_ADDRSTRLEN ];
szAddr = inet_ntop( AF_INET6, &sa->sin6_addr, buf, sizeof( buf ) );
szAddr = inet_ntop( AF_INET6, ( void * ) &sa->sin6_addr, buf, sizeof( buf ) );
# else
{
int iTODO;