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

Conflicting types for inet_ntop 编译错误 #29

Open
XINCGer opened this issue Jul 17, 2020 · 2 comments
Open

Conflicting types for inet_ntop 编译错误 #29

XINCGer opened this issue Jul 17, 2020 · 2 comments

Comments

@XINCGer
Copy link

XINCGer commented Jul 17, 2020

image
在新版的msys2(msys2-x86_64-20200629.exe)上编译tolua_runtime会报上面的错误。
原因是新版的msys2中已经带有了inet_pton了,即inet_pton已经存在于mingw的ws2tcpip.h文件了,将luasocket/inet.c和luasocket.h中有关该函数相关声明与定义注释掉以后,可以编译通过。
https://docs.microsoft.com/zh-cn/windows/win32/api/ws2tcpip/nf-ws2tcpip-inet_pton

luasocket仓库那边也提交过相关的Issue:lunarmodules/luasocket#298

@jinq0123
Copy link

jinq0123 commented Sep 2, 2020

luasocket/inet.h 中删除 LUASOCKET_INET_PTON 定义就编译通过了。

#ifdef __MINGW32__
#define LUASOCKET_INET_PTON
#endif

最新版 luasocket 已删除了这个。

@XINCGer
Copy link
Author

XINCGer commented Sep 2, 2020

是这个意思

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

2 participants