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

KO Myung-Hun komh78 at gmail.com
Mon Feb 24 11:04:17 CET 2020


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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-configure-check-socklen_t-as-int-first.patch
Type: application/x-patch
Size: 1393 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200224/96997be6/attachment.bin>


More information about the vlc-devel mailing list