[MPlayer-dev-eng] [PATCH] 'socklen_t' definition

Rich Felker dalias at aerifal.cx
Fri Feb 29 19:52:53 CET 2008


On Fri, Feb 29, 2008 at 10:53:18AM +0300, Michael Kostylev wrote:
> 
> At Fri, 29 Feb 2008 00:34:25 +0900,
> KO Myung-Hun wrote:
> 
>  >>> Currently, 'HAVE_SOCKLEN_T 1' is defined unconditionally. But some
>  >>> systems such as OS/2 do not support 'socklen_t' type. So we need to
>  >>> check and to typedef it if not supported.
>  >> Your patch can break cross-compiling.
>  > Why and what case ?
> 
> E.g. building on linux:
> 
> % gcc -O -I. -DCODECS2HTML codec-cfg.c -o codec-cfg
> In file included from codec-cfg.c:28:
> config.h:1539: error: conflicting types for `socklen_t'
> /usr/include/unistd.h:243: error: previous declaration of `socklen_t'
> 
> % gcc -E -O -I. -DCODECS2HTML codec-cfg.c | grep socklen_t
> __extension__ typedef unsigned int __socklen_t;
> typedef __socklen_t socklen_t;
> typedef int socklen_t;

Really codec-cfg.c needs to use its own separate 'host-config.h' or
the like. Or, better, we could move the master data from codecs.conf
to a .c file and be rid of the monstrosity of codec-cfg.c.

Rich



More information about the MPlayer-dev-eng mailing list