[vlc-devel] [PATCH 3/5] configure: define socklen_t to int not unsigned int

Rémi Denis-Courmont remi at remlab.net
Mon Jun 17 10:25:57 CEST 2019


Hi,

To be precise, the spec stated that it must be an unsigned of at least 32 bits.

Now the spec only states that it must be at least 32-bits and that the sign bit should be left alone to avoid portability problems.

Le 17 juin 2019 09:40:33 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2019-06-16 16:35, KO Myung-Hun wrote:
>> OS/2 socket APIs use int not unsigned int in place of socklen_t. As
>> a result, compilation is stopped at function call requiring socklen_t
>*
>> because of type mismatch between int * and unsigned int *.
>
>the spec says that socklen_t should be an unsigned integer of at least 
>32 bits. So for OS/2 you may need an int64. But if pointers are used 
>that's not an option. So the patch should conditionally define
>socklen_t 
>to what you want only for OS/2. The rest of the time it should be as it
>
>is now.
>
>> ---
>>   configure.ac | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/configure.ac b/configure.ac
>> index b38f693989..9e9d56d2b6 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -762,7 +762,7 @@ ac_cv_type_socklen_t,
>>   ac_cv_type_socklen_t=yes,
>>   ac_cv_type_socklen_t=no)])
>>   AS_IF([test "$ac_cv_type_socklen_t" = no],
>> - [AC_DEFINE(socklen_t, unsigned int)])
>> + [AC_DEFINE(socklen_t, int)])
>>   
>>   dnl Check for struct sockaddr_storage
>>   AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if
><sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
>> -- 
>> 2.13.3
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190617/533bcbb2/attachment.html>


More information about the vlc-devel mailing list