Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 31 Jan 2017 12:50:25 -0600
From: William Pitcock <nenolod@...eferenced.org>
To: Harald Arnesen <harald@...gtun.org>
Cc: alpine-dev <alpine-devel@...ts.alpinelinux.org>, musl@...ts.openwall.com
Subject: Re: [alpine-devel] Non-standard C library

Hello,

On Tue, Jan 31, 2017 at 12:22 PM, Harald Arnesen <harald@...gtun.org> wrote:
> musl defines "IPPORT_RESERVED" in "netdb.h", while both GNU libc and BSD
> libc define it in "netinet/in.h". And I can't find an e-mail address for
> a musl developer without subscribing to their mailing list.
>
>
> This is from a conversation with Snobol maintainer Phil Budne:
>
>> > This one is from an old Asus EeePC 900, running AlpineLinux, which uses
>> > the musl libc instead of glibc. A compile error ('IPPORT_RESERVED'
>> > undeclared) in 'lib/auxil/bindresvport.c' was fixed by
>> > '#include <netdb.h>'
>
> Thanks!
>
> I'd report it as a bug in libc....  IPPORT_RESERVED is a property of
> on the wire protocol (or at least the local TCP stack), while
> <netdb.h> is the interface for hostname lookups.
>
> Linux and BSD agree the constant comes from netinet/in.h
>
> And charmingly, they refuse to define an ifdef so you can tell
> you're using their broken library (because they're never wrong):
>
> http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
>
> I've put this in after #include <errno.h>:
>
> #if !defined(IPPORT_RESERVED) && !defined(__GLIBC__)
> /*
>  * could be using broken musl libc!
>  * they refuse to identify themselves:
>  * http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
>  */
> #include <netdb.h>
> #endif

I checked on both a Debian and FreeBSD machine and indeed, they both
have it in netinet/in.h.

What shall we do?

William

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.