diff --git a/source/FreeRTOS_Sockets.c b/source/FreeRTOS_Sockets.c index cd7629615..672680ee7 100644 --- a/source/FreeRTOS_Sockets.c +++ b/source/FreeRTOS_Sockets.c @@ -1928,6 +1928,7 @@ BaseType_t vSocketBind( FreeRTOS_Socket_t * pxSocket, pxAddress = &xAddress; /* Clear the address: */ ( void ) memset( pxAddress, 0, sizeof( struct freertos_sockaddr ) ); + if( pxSocket->bits.bIsIPv6 == pdFALSE_UNSIGNED ) { pxAddress->sin_family = FREERTOS_AF_INET6; diff --git a/source/include/FreeRTOSIPConfigDefaults.h b/source/include/FreeRTOSIPConfigDefaults.h index bcd640bb9..0b9c2d90a 100644 --- a/source/include/FreeRTOSIPConfigDefaults.h +++ b/source/include/FreeRTOSIPConfigDefaults.h @@ -3122,13 +3122,14 @@ */ #ifndef FreeRTOS_flush_logging - #define FreeRTOS_flush_logging() if( ipconfigHAS_PRINTF || ipconfigHAS_DEBUG_PRINTF ) \ - { \ - do {} while( ipFALSE_BOOL ); \ - } \ - else \ - { \ - } + #define FreeRTOS_flush_logging() \ + if( ipconfigHAS_PRINTF || ipconfigHAS_DEBUG_PRINTF ) \ + { \ + do {} while( ipFALSE_BOOL ); \ + } \ + else \ + { \ + } #endif /*---------------------------------------------------------------------------*/