refactor: 解决m核开启ipv6功能的编译
close #I4NOIP Signed-off-by: zhangyang <zhangyang349@huawei.com>
This commit is contained in:
parent
85a1ce43c6
commit
c7843926b8
|
@ -63,7 +63,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For BSD 4.4 socket sa_len compatibility
|
// For BSD 4.4 socket sa_len compatibility
|
||||||
#define DF_NADDR(addr)
|
#define DF_NADDR(addr) ip_addr_t naddr = (addr)
|
||||||
#define SA_LEN(addr, _) (IP_IS_V4_VAL(addr) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
|
#define SA_LEN(addr, _) (IP_IS_V4_VAL(addr) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
|
||||||
#define sa_len sa_data[0] * 0 + SA_LEN(naddr, _)
|
#define sa_len sa_data[0] * 0 + SA_LEN(naddr, _)
|
||||||
#define sin_len sin_zero[0]
|
#define sin_len sin_zero[0]
|
||||||
|
|
Loading…
Reference in New Issue