[MPlayer-dev-eng] [PATCH] 'socklen_t' definition
KO Myung-Hun
komh at chollian.net
Sat Mar 1 15:39:51 CET 2008
Hi/2.
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;
>
>
BTW, your sys/socket.h does not have typedef for socklen_t ? Strange.
> > 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.
>
>
Ok. I've updated the patch to check unistd.h as well.
How about this ?
--
KO Myung-Hun
Using Mozilla SeaMonkey 1.1.8
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1 GHz with 512 MB RAM
Korean OS/2 User Community : http://www.ecomstation.co.kr
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: socklen_t.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080301/be60ccf8/attachment.asc>
More information about the MPlayer-dev-eng
mailing list