Fixed constant initializer problem in ip_addr_t by having ip6 first

This commit is contained in:
goldsimon
2015-04-10 07:41:40 +02:00
parent ffd45a2261
commit d31dbc6798
3 changed files with 17 additions and 34 deletions

View File

@@ -44,24 +44,8 @@
#include "lwip/netif.h"
/* used by IP_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */
const ip_addr_t ip_addr_any = {
#if LWIP_IPV6
{
#endif
IPADDR_ANY
#if LWIP_IPV6
}, IPADDR_TYPE_V4
#endif
};
const ip_addr_t ip_addr_broadcast = {
#if LWIP_IPV6
{
#endif
IPADDR_BROADCAST
#if LWIP_IPV6
}, IPADDR_TYPE_V4
#endif
};
const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY);
const ip_addr_t ip_addr_broadcast = IPADDR4_INIT(IPADDR_BROADCAST);
/**
* Determine if an address is a broadcast address on a network interface

View File

@@ -48,13 +48,7 @@
#include "lwip/def.h"
/* used by IP6_ADDR_ANY(6) in ip6_addr.h */
const ip_addr_t ip6_addr_any = {
#if LWIP_IPV4
{ 0ul }, IPADDR_TYPE_V6
#else
0ul, 0ul, 0ul, 0ul
#endif
};
const ip_addr_t ip6_addr_any = IPADDR6_INIT(0xaul, 0xbul, 0xcul, 0xdul);
#ifndef isprint
#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up)