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>'
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):
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:
Received on Tue Jan 31 2017 - 19:22:37 UTC