[vlc-devel] [PATCH 2/5] configure: define socklen_t to int on OS/2
KO Myung-Hun
komh78 at gmail.com
Tue Nov 19 15:20:38 CET 2019
Hi/2.
Steve Lhomme wrote:
> Hi,
>
> On 2019-11-19 13:16, 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 *.
>> ---
>> configure.ac | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index a53c9245af..184fa13ee7 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -756,7 +756,8 @@ 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)])
>> + [AS_CASE([${host_os}], [os2*],
>> + AC_DEFINE(socklen_t, int), AC_DEFINE(socklen_t, unsigned
>> int))])
>
> If socklen_t exists it should be detected and this code never called.
>
Sure. This code is called only if socklen_t is not detected.
> Also it may be better to use socklen_t where it's expected instead of
> using "unsigned int".
>
Sure. but this comment is irrelavant to this patch because it is for
systems without socklen_t like OS/2, and defines socklen_t to int on
OS/2 or unsigned int on other systems not using int or unsigned int
directly.
I'm afraid I don't understand your comment.
--
KO Myung-Hun
Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v6.0.10 on Intel Core i7-3615QM 2.30GHz with 12GB RAM
Korean OS/2 User Community : http://www.os2.kr/
More information about the vlc-devel
mailing list