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

cmake: Fix build with GCC 14 + MinGW #13578

Closed
wants to merge 1 commit into from
Closed

Commits on May 10, 2024

  1. cmake: Fix build with GCC 14 + MinGW

    The function signature has had u_long flags since ever. This is how it
    is defined in the documentation, and implemented in MinGW.
    
    The code that uses ioctlsocket in nonblock.c also has unsigned long.
    
    Error:
    CurlTests.c:275:41: error: passing argument 3 of 'ioctlsocket' from incompatible pointer type [-Wincompatible-pointer-types]
      275 |         if(0 != ioctlsocket(0, FIONBIO, &flags))
          |                                         ^~~~~~
          |                                         |
          |                                         int *
    In file included from CurlTests.c:266:
    /opt/mxe/usr/i686-w64-mingw32.static/include/winsock2.h:1007:76: note: expected 'u_long *' {aka 'long unsigned int *'} but argument is of type 'int *'
     1007 |   WINSOCK_API_LINKAGE int WSAAPI ioctlsocket(SOCKET s,__LONG32 cmd,u_long *argp);
          |                                                                    ~~~~~~~~^~~~
    orgads committed May 10, 2024
    Configuration menu
    Copy the full SHA
    9b3fe1f View commit details
    Browse the repository at this point in the history