luasec icon indicating copy to clipboard operation
luasec copied to clipboard

`socklen_t` already defined on mingw32-w32api-dev 5.3

Open DarkWiiPlayer opened this issue 4 years ago • 5 comments

This is pretty much the same issue as luasocket has.

MinGWs ws2tcpip.h now defines socklen_t since the last version, causing an error when Luarocks tries to compile the .c files when installing luasec.

DarkWiiPlayer avatar Mar 29 '20 13:03 DarkWiiPlayer

Update: a possible fix for this is currently (not) being discussed on the luasocket repository here: https://github.com/diegonehab/luasocket/pull/303

DarkWiiPlayer avatar Apr 07 '20 08:04 DarkWiiPlayer

I don't know why you'd say "(not)". LuaSocket would like to do the right thing for users of new mingw32 versions without doing the wrong thing for users of earlier mingw32 versions. I'd imagine that LuaSec wants the same. If anyone has a good #ifdef for that, please share.

ewestbrook avatar Apr 07 '20 18:04 ewestbrook

Well, there's not really a discussion going on, which is precisely why linked it here. The way I understand it, nobody really knows an ideal way to deal with this and just deleting the typedef altogether as in my pull request may end up breaking the library on some other system. I'm not complaining that luasocket isn't instantly fixing this, I'm just annoyed that none of the users care enough to add to the discussion.

I imagine the best way to get this fixed quickly is having more feedback from users on "weird" systems with old or patched versions of MinGW, outdated windows versions, etc.

DarkWiiPlayer avatar Apr 08 '20 08:04 DarkWiiPlayer

How to fix this issues quickly?

limjiregister avatar Jun 01 '20 12:06 limjiregister

I need to setup an environment to reproduce this issue. I need to find a Windows machine and if you can help me with mingw...

brunoos avatar Jun 03 '20 18:06 brunoos