[MPlayer-dev-eng] [PATCH] Correctly detect sockaddr_storage on OpenBSD

Alex Converse alex.converse at gmail.com
Wed Aug 4 19:14:20 CEST 2010


On Wed, Aug 4, 2010 at 11:55 AM, Attila Kinali <attila at kinali.ch> wrote:
> On Tue, 03 Aug 2010 16:30:54 +0200
> Diego Biurrun <diego at biurrun.de> wrote:
>
>> On Tue, Aug 03, 2010 at 03:08:52PM +0100, Edd Barrett wrote:
>> > <sys/socket.h> requires <sys/types.h> on OpenBSD.
>>
>> Then why does sys/socket.h not #include sys/types.h on OpenBSD?
>>
>> Again, I think you are patching the wrong side.  Fix the header on
>> OpenBSD once and you will make hundreds of packages work immediately
>> instead of manually submitting patches to a trillion projects...
>
> We have bigger hacks for other systems. I think that including

And quite a few of our hacks are already for *BSD. There are other
systems like MSVC where we haven't accepted the hacks.

> an additional headerfile is quite harmless. Our ranting here,
> that *BSD has too many anachronisms wont help, as you cannot
> change the way an old elephant walks on. You can only scare him,
> which will get you stamped on.
>

We rant about the BSD anacronisms because they have a persecution
complex about people writing unportable software all while being too
lazy to implement decade old standards like C99 libm.

> Beside, socket(2) explicitly notes:
> ---schnapp---
>       POSIX.1-2001  does not require the inclusion of <sys/types.h>, and this
>       header file is not required on Linux.  However, some  historical  (BSD)
>       implementations  required  this  header file, and portable applications
>       are probably wise to include it.
> ---schnapp---
>

Find a link on opengroup.org, not some arbitrary manpage.

http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html

says:
The <sys/socket.h> header shall define the size_t and ssize_t types as
described in <sys/types.h>.

Is there something else from <sys/types.h> that is needed?

> As i don't see any problems caused by including sys/types.h, we should
> IMHO include it unconditionally.
>

--Alex


More information about the MPlayer-dev-eng mailing list