[vlc-devel] [PATCH] configure: check socklen_t as int first

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 20 15:09:33 CET 2020


This second patch looks OK. At least it works for Linux and Windows for me.

On 2020-02-24 11:04, KO Myung-Hun wrote:
> Hi/2.
> 
> Rémi Denis-Courmont wrote:
>> Le maanantaina 17. helmikuuta 2020, 10.19.53 EET KO Myung-Hun a écrit :
>>> 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 *.
>>> ---
>>>   configure.ac | 18 ++++++++++++++++--
>>>   1 file changed, 16 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 7741ddca55..16eee78456 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -759,8 +759,22 @@ ac_cv_type_socklen_t,
>>>   #endif]], [[socklen_t len; len = 0;]])],
>>>   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)])
>>> +AS_IF([test "$ac_cv_type_socklen_t" = no], [
>>> +  VLC_SAVE_FLAGS
>>> +  CFLAGS="-Wpointer-sign -Werror"
>>
>> I doubt that all C compilers support those specific flags, especially the first.
>> If you want to match the getpeername() prototype, you should probably use
>> _Generic.
>>
> 
> How about this?
> 
> -- 
> KO Myung-Hun
> 
> Using Mozilla SeaMonkey 2.7.2
> Under OS/2 Warp 4 for Korean with FixPak #15
> In VirtualBox v6.0.8 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
> 
> Korean OS/2 User Community : http://www.os2.kr/
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list