Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译出错 #4

Open
antserver opened this issue Jan 26, 2019 · 4 comments
Open

编译出错 #4

antserver opened this issue Jan 26, 2019 · 4 comments

Comments

@antserver
Copy link

RT-Thread开启coap协议,编译出现一大推错误

@murphyzhao
Copy link
Contributor

murphyzhao commented Jan 26, 2019

无论是否使用 SAL 都会出现错误,我把未定义的东西,一通加之后,倒是能编译过去,但加的地方并不合适,这里先给出我增加的部分,后面给出官方版本:

修改 components\net\sal_socket\include\sal_socket.h,如下所示:

struct sockaddr_in6 {
 u8_t            sin6_len;      /* length of this structure    */
 sa_family_t     sin6_family;   /* AF_INET6                    */
 in_port_t       sin6_port;     /* Transport layer port #      */
 u32_t           sin6_flowinfo; /* IPv6 flow information       */
 struct in6_addr sin6_addr;     /* IPv6 address                */
 u32_t           sin6_scope_id; /* Set of interfaces for scope */
};

extern const struct in6_addr in6addr_any;
#define IP_CLASSD(a)        (((u32_t)(a) & 0xf0000000UL) == 0xe0000000UL)
#define IP_CLASSD_NET       0xf0000000          /* These ones aren't really */
#define IP_CLASSD_NSHIFT    28                  /*   net and host fields, but */
#define IP_CLASSD_HOST      0x0fffffff          /*   routing needn't know. */
#define IP_MULTICAST(a)     IP_CLASSD(a)

#define IN_MULTICAST(a)     IP_MULTICAST(a)

还有要打开 ipv6

@Lawlieta
Copy link
Contributor

最新系统中 SAL 组件已经添加 IPV6 功能支持,可以试着开启 IPV6 功能支持后直接使用

RT-Thread/rt-thread#2807

@Ghazigq
Copy link

Ghazigq commented Feb 23, 2021

最新系统中SAL组件已经添加IPV6功能支持,可以试着开启IPV6功能支持后直接使用

RT线程/ rt线程#2807

开启后也会出现编译错误

@Ghazigq
Copy link

Ghazigq commented Feb 23, 2021

编译错误 怎么解决呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants