Skip to content

[bug] Unable to build with github msys action #95

Description

@caiiiycuk

Description

I have following action configuration:

    - uses: msys2/setup-msys2@v2
      with:
          msystem: mingw64

And trying to build wsServer. It fails because of this:

ws.c:1778:71: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
 1778 |                         setsockopt(new_sock, SOL_SOCKET, SO_SNDTIMEO, &time,
      |                                                                       ^~~~~
      |                                                                       |
      |                                                                       struct timeval *

source code link.

I don't know the reason but problematic parameter defined as const char* in mingw headers:

  WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);

I can bypass this by changing error level to warning, but I think it's good to fix. Other than this wsServer works fine on windows! Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions