Skip to content

Conflicting types for inet_ntop 编译错误 #29

@XINCGer

Description

@XINCGer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions