errno's needed by rtems marked as linux extensions

Jeff Johnston
Wed Dec 16 19:43:00 GMT 2009

A patch has been made to move the 3 errnos into the general list.

2009-12-16  Jeff Johnston  <>

         * libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT,
         and ETOOMANYREFS into general list as they are referenced
         by OpenGroup and needed by RTEMS.

-- Jeff J.

On 16/12/09 01:12 PM, Joel Sherrill wrote:
> Hi,
> RTEMS TCP/IP code will not compile against the newlib
> head.
> I posted earlier this year about errno's that had
> been marked as Linux specified which are really not.
> I found 6 errnos originally but the two others
> on the original list were part of a longer string so
> showed up via grep but were not really used.
> ========= EBADRQC (RTEMS code we can change)
> cpukit/libnetworking/lib/ftpfs.c
> ========= EPFNOSUPPORT (used in Sun RPC/XDR)
> cpukit/librpc/src/rpc/bindresvport.c
> cpukit/librpc/src/rpc/clnt_generic.c
> ========= EHOSTDOWN (used in BSD TCP/IP stack)
> cpukit/libnetworking/netinet/ip_input.c
> cpukit/libnetworking/netinet/tcp_subr.c
> cpukit/libnetworking/nfs/bootp_subr.c
> cpukit/libnetworking/net/if_ethersubr.c
> ========= ETOOMANYREFS (BSD TCP/IP stack)
> cpukit/libnetworking/netinet/ip_output.c
> So EBADRQC can be changed on our site. That code
> is specific to RTEMS and we can changed that to EINVAL.
> EHOSTDOWN is defined in OpenGroup. The other two I don't know.
> In general, the "Linux specific patch" marked some BSD
> and OpenGroup errnos as Linux specific. That covers
> the 3 we care about.
> IMO EHOSTDOWN should just be enabled. It is incorrect
> to mark is as Linux specific.
> The other two are from BSD. What to do about them is
> up to you. They are NOT proprietary to RTEMS.
> When I looked originally, I found these OpenGroup references
>> Are there any relevant standards?
>> + EHOSTDOWN is from
>> so it is probably really not Linux specific anyway.
>> + Every errno in this list appears in the Open Group test suite.
>> I was unable to uncompress this so don't know what that means.
>> I didn't see any obvious references to them at in
>> a standards page in my search.
>> It would be interesting to see if other errnos marked
>> Linux extensions are also used by *BSD but the set above
>> are the problems for RTEMS. We cannot build RTEMS with
>> newlib cvs without those defined.

More information about the Newlib mailing list