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

Rémi Denis-Courmont remi at remlab.net
Wed Mar 18 16:36:37 CET 2020


Le keskiviikkona 18. maaliskuuta 2020, 14.00.54 EET Steve Lhomme a écrit :
> On 2020-02-17 9:19, 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 | 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"
> 
> This seems specific to your compiler, we may end up having a compilation
> error because of those flags, even if an 'unsigned int' is what we
> should use.

I think you're reading the penultimate version of the patch.

The latest one does not use compiler flags.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list