[Xcb] [PATCH] Link with winsock library for socket functions on MinGW

Jon TURNEY jon.turney at dronecode.org.uk
Sat Jul 4 07:09:26 PDT 2015


On 04/07/2015 14:31, Uli Schlachter wrote:
> Am 17.03.2015 um 18:49 schrieb Jon TURNEY:
>> Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
>> ---
>>   configure.ac | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 6e7e9c3..cce0ddb 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -206,6 +206,15 @@ case $host_os in
>>           ;;
>>   esac
>>
>> +dnl Link with winsock for socket functions on MinGW
>> +case $host_os in
>> +        *mingw*)
>> +                AC_CHECK_LIB([ws2_32],[main])
>
> Why "main"?
>
> You should use a function for this test that is really part of ws2_32.

That would be ideal.

Unfortunately, it's a relatively long-standing issue with autoconf that 
AC_CHECK_LIB cannot find functions which don't use the default calling 
convention.

In this case, ws2_32, like most Windows system libraries, uses the 
stdcall calling convention.



More information about the Xcb mailing list