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

Michael Kostylev mik at niipt.ru
Fri Feb 29 08:53:18 CET 2008


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;

 > So, would you mind giving me advice to avoid that problem ?

I didn't discover it but tried '#define socklen_t int' instead of typedef.

Michael



More information about the MPlayer-dev-eng mailing list