|
|
Message-ID: <3767688.o7rAqR3Ra6@cagnes>
Date: Mon, 23 Nov 2026 22:30:30 +0100
From: Bruno Haible <bruno@...sp.org>
To: Rich Felker <dalias@...c.org>
Cc: bug-gnulib@....org, musl@...ts.openwall.com
Subject: Re: Document a few musl libc problems
Rich Felker wrote:
> > +@...m
> > +The returned @code{struct servent} has a nonsensical @code{s_aliases} value
> > +on some platforms:
> > +musl libc.
>
> Can you clarify "nonsensical"?
Sure: When I ask for the services with name == "www", I get
{ s_name = "www", s_aliases = [ "www" ], port = 80 }.
1) The s_aliases array is described in POSIX [1] as "alternative"
service names. If the only information you got is "www", I would
expect a return value without duplicates, namely
{ s_name = "www", s_aliases = [], port = 80 }.
2) When I ask for the services with name == "http", I get
{ s_name = "http", s_aliases = [ "http" ], port = 80 }.
So, evidently, "http" and "www" are aliases of each other. What I would
have expected — and what all other libcs return — is either
{ s_name = "www", s_aliases = [ "http" ], port = 80 }
or
{ s_name = "http", s_aliases = [ "www" ], port = 80 }
Bruno
[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netdb.h.html
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.