diff --git a/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h b/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h index fc6c6d1287..5d5f8d2120 100644 --- a/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h +++ b/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h @@ -179,6 +179,7 @@ #define STM32_IRQ_MDIOS (STM32_IRQ_FIRST + 109) /* 109: MDIO slave global interrupt */ #define STM32_IRQ_NEXTINTS 110 +#define STM32_IRQ_NIRQS (STM32_IRQ_FIRST + 110) /* EXTI interrupts (Do not use IRQ numbers) */ diff --git a/libs/libc/netdb/lib_gethostbyaddrr.c b/libs/libc/netdb/lib_gethostbyaddrr.c index 678408b7f3..9da2e0beef 100644 --- a/libs/libc/netdb/lib_gethostbyaddrr.c +++ b/libs/libc/netdb/lib_gethostbyaddrr.c @@ -82,9 +82,9 @@ static bool lib_lo_ipv4match(FAR const void *addr, socklen_t len, int type) if (type == AF_INET && len >= sizeof(struct in_addr)) { ipv4addr = (FAR struct in_addr *)addr; - return net_ipv4addr_maskcmp(ipv4addr->sin_addr.s_addr, - g_lo_ipv4addr->s_addr, - g_lo_ipv4addr->s_addr); + return net_ipv4addr_maskcmp(ipv4addr->s_addr, + g_lo_ipv4addr, + g_lo_ipv4addr); } return false; @@ -108,7 +108,7 @@ static bool lib_lo_ipv4match(FAR const void *addr, socklen_t len, int type) * ****************************************************************************/ -#ifdef CONFIG_NET_LOOPBACK +#if (defined CONFIG_NET_LOOPBACK) && defined (CONFIG_NET_IPv6) static bool lib_lo_ipv6match(FAR const void *addr, socklen_t len, int type) { FAR struct in_addr6 *ipv6addr; @@ -167,7 +167,8 @@ static int lib_localhost(FAR const void *addr, socklen_t len, int type, src = (FAR uint8_t *)&g_lo_ipv4addr; host->h_addrtype = AF_INET; } - else if (lib_lo_ipv4match(addr, len, type)) +#ifdef CONFIG_NET_IPv6 + else if (lib_lo_ipv6match(addr, len, type)) { /* Setup to transfer the IPv6 address */ @@ -175,6 +176,7 @@ static int lib_localhost(FAR const void *addr, socklen_t len, int type, src = (FAR uint8_t *)&g_lo_ipv6addr; host->h_addrtype = AF_INET6; } +#endif else { /* Return 1 meaning that we have no errors but no match either */