Mail archive

Re: [alpine-devel] Non-standard C library

From: William Pitcock <>
Date: Tue, 31 Jan 2017 17:52:12 -0600


On Tue, Jan 31, 2017 at 3:33 PM, Harald Arnesen <> wrote:
> William Pitcock [2017-01-31 20:25]:
>> I asked about it on the musl list for you. They rejected the change
>> request, citing POSIX:
>> which explicitly says:
>> "The <netdb.h> header shall define the IPPORT_RESERVED symbolic
>> constant with the value of the highest reserved Internet port number."
>> Including both <netinet/in.h> and <netdb.h> is likely more portable
>> than the Snobol maintainer's current approach, as well.
> And which operating systems follow that Posix standard?

Almost all UNIX-like operating systems follow POSIX.

GNU systems running on Glibc will pick up IPPORT_RESERVED from
<netdb.h> due to it's inclusion of <netinet/in.h>. While in general,
there is an argument which may be made for following implementation
quirks of the past, depending on <netinet/in.h> to provide
IPPORT_RESERVED is not a requirement of POSIX. The solution I
mentioned earlier will provide portability for systems which do not
provide IPPORT_RESERVED in netinet/in.h without harming the build


Received on Tue Jan 31 2017 - 17:52:12 UTC