From: William Pitcock <nenolod@dereferenced.org>
To: Harald Arnesen <harald@skogtun.org>
Cc: alpine-dev <alpine-devel@lists.alpinelinux.org>, musl@lists.openwall.com
Subject: Re: [alpine-devel] Non-standard C library
Date: Tue, 31 Jan 2017 12:50:25 -0600 [thread overview]
Message-ID: <CA+T2pCE36Z8j_wnHCb7gK_VwKt3BOHws-KJLW401s-Of3NN9Ug@mail.gmail.com> (raw)
In-Reply-To: <717ca2a3-d579-4ab6-ace2-1bc0dbbb111c@skogtun.org>
Hello,
On Tue, Jan 31, 2017 at 12:22 PM, Harald Arnesen <harald@skogtun.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
next parent reply other threads:[~2017-01-31 18:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+T2pCEB9g=un1jx0x2k+wKNQWeBt8hijEwq1Yy+qLLvb0OVrw@mail.gmail.com>
[not found] ` <20170126112655.44ad5c0e@vostro.util.wtbts.net>
[not found] ` <4EDA0683-3991-44D0-882C-C34FBD4C38B2@jirutka.cz>
[not found] ` <i2ems4.oke5ti.1hge1d6-qmf@gmx.com>
[not found] ` <CA+T2pCF+dFPhWBKcwdUSp_Fr1Jk=rT1Pweap6iPZMXjf6HFi8g@mail.gmail.com>
[not found] ` <5blaf1.okfi73.2tnq26-qmf@gmx.com>
[not found] ` <CA+T2pCErwS_KFW98fvJ86-cx-dmpruxeCVKu-gG-2Ud08UVwpw@mail.gmail.com>
[not found] ` <5890704A.8090402@mail.com>
[not found] ` <CA+T2pCHJ9-aOzd_A2=5W_eF__ja+uC4yPf6LPyOQpxJKKAreUQ@mail.gmail.com>
[not found] ` <717ca2a3-d579-4ab6-ace2-1bc0dbbb111c@skogtun.org>
2017-01-31 18:50 ` William Pitcock [this message]
2017-01-31 19:08 ` A. Wilcox
2017-01-31 19:23 ` Rich Felker
2017-01-31 19:37 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+T2pCE36Z8j_wnHCb7gK_VwKt3BOHws-KJLW401s-Of3NN9Ug@mail.gmail.com \
--to=nenolod@dereferenced.org \
--cc=alpine-devel@lists.alpinelinux.org \
--cc=harald@skogtun.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).