[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #13106] Add IPv6 scopes
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [task #13106] Add IPv6 scopes |
Date: |
Fri, 3 Feb 2017 22:32:12 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #21, task #13106 (project lwip):
I'm seeing the following builds errors on MSVC 2013
1>e:\projects\lwip\src\api\netdb.c(379): error C2039: 'zone' : is not a member
of 'ip_addr'
1> e:\projects\lwip\src\include\lwip\ip_addr.h(69) : see declaration
of 'ip_addr'
1>e:\projects\lwip\src\api\sockets.c(323): error C2220: warning treated as
error - no 'object' file generated
1>e:\projects\lwip\src\api\sockets.c(323): warning C4242: '=' : conversion
from 'const u32_t' to 'u8_t', possible loss of data
The following changes fixed it for me, I can push if this is correct:
$ git diff src/api/netdb.c
diff --git a/src/api/netdb.c b/src/api/netdb.c
index e2353d8..6cf7469 100644
--- a/src/api/netdb.c
+++ b/src/api/netdb.c
@@ -376,7 +376,7 @@ lwip_getaddrinfo(const char *nodename, const char
*servname,
sa6->sin6_family = AF_INET6;
sa6->sin6_len = sizeof(struct sockaddr_in6);
sa6->sin6_port = lwip_htons((u16_t)port_nr);
- sa6->sin6_scope_id = ip6_addr_zone(&addr);
+ sa6->sin6_scope_id = ip6_addr_zone(ip_2_ip6(&addr));
ai->ai_family = AF_INET6;
#endif /* LWIP_IPV6 */
} else {
$ git diff src/api/sockets.c
diff --git a/src/api/sockets.c b/src/api/sockets.c
index 9368e5b..2e2810e 100644
--- a/src/api/sockets.c
+++ b/src/api/sockets.c
@@ -100,7 +100,7 @@
#define SOCKADDR6_TO_IP6ADDR_PORT(sin6, ipaddr, port) do { \
inet6_addr_to_ip6addr(ip_2_ip6(ipaddr), &((sin6)->sin6_addr)); \
if (ip6_addr_has_scope(ip_2_ip6(ipaddr), IP6_UNKNOWN)) { \
- ip6_addr_set_zone(ip_2_ip6(ipaddr), (sin6)->sin6_scope_id); \
+ ip6_addr_set_zone(ip_2_ip6(ipaddr), (u8_t)(sin6)->sin6_scope_id); \
} \
(port) = lwip_ntohs((sin6)->sin6_port); }while(0)
#endif /* LWIP_IPV6 */
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?13106>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #13106] Add IPv6 scopes, Simon Goldschmidt, 2017/02/03
- [lwip-devel] [task #13106] Add IPv6 scopes, Simon Goldschmidt, 2017/02/03
- [lwip-devel] [task #13106] Add IPv6 scopes, Simon Goldschmidt, 2017/02/03
- [lwip-devel] [task #13106] Add IPv6 scopes,
Joel Cunningham <=
- [lwip-devel] [task #13106] Add IPv6 scopes, David van Moolenbroek, 2017/02/03
- [lwip-devel] [task #13106] Add IPv6 scopes, David van Moolenbroek, 2017/02/04
- [lwip-devel] [task #13106] Add IPv6 scopes, Joel Cunningham, 2017/02/07
- [lwip-devel] [task #13106] Add IPv6 scopes, David van Moolenbroek, 2017/02/07
- [lwip-devel] [task #13106] Add IPv6 scopes, Dirk Ziegelmeier, 2017/02/09
- [lwip-devel] [task #13106] Add IPv6 scopes, Simon Goldschmidt, 2017/02/09
- [lwip-devel] [task #13106] Add IPv6 scopes, Simon Goldschmidt, 2017/02/09
- [lwip-devel] [task #13106] Add IPv6 scopes, David van Moolenbroek, 2017/02/10
- [lwip-devel] [task #13106] Add IPv6 scopes, Simon Goldschmidt, 2017/02/10
- [lwip-devel] [task #13106] Add IPv6 scopes, David van Moolenbroek, 2017/02/10