-
Notifications
You must be signed in to change notification settings - Fork 629
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
socklen_t
already defined on mingw32-w32api-dev 5.3
#302
Comments
As a quick fix, adding the following at the end of the rockspec works: build.patches = {
['Fix mingw API change'] = [[
--- old/src/wsocket.h 2020-03-29 12:11:42.904053000 +0200
+++ new/src/wsocket.h 2020-03-29 12:10:06.829148800 +0200
@@ -11,7 +11,7 @@
#include <winsock2.h>
#include <ws2tcpip.h>
-typedef int socklen_t;
+//typedef int socklen_t;
typedef SOCKADDR_STORAGE t_sockaddr_storage;
typedef SOCKET t_socket;
typedef t_socket *p_socket;]]
} |
I just dug through the mingw project again and found that the typedef isn't new, but it used to be just EDIT: Given that this was always defined, is it even necessary to have it again in luasocket, or should the typedef just be removed altogether? |
Nobody know how to fix this issue? |
@limjiregister there's literally a patch in one of my previous comments |
While trying to install luasocket on a fairly new windows installation, I started getting the following error:
After digging through files for a few hours (honestly, having no idea what I was doing, as I don't know and don't care much about mingw or windows in general), I found that there was apparently an update that adds this type definition to the header file.
From what I can tell, the typedefs should be mostly compatible (
int
vs.unsigned int
). Assuming the value can't be negative, which sounds reasonable, given the type name.The commit that introduced the changes in the git repo:
The LuaSec module seems to have the exact same problem.
The text was updated successfully, but these errors were encountered: