All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: bug in signature of getnameinfo()
       [not found] <280D0348-17CF-4A16-87BC-18D884101324@gi2.de>
@ 2026-04-09 19:49 ` Alejandro Colomar
  0 siblings, 0 replies; only message in thread
From: Alejandro Colomar @ 2026-04-09 19:49 UTC (permalink / raw)
  To: GIquadrat; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

Hi Thorsten,

On 2026-04-09T16:42:27+0200, GIquadrat wrote:
> Hi,
> 
> https://www.man7.org/linux/man-pages/man3/getnameinfo.3.html
> 
> shows a strange signature of getnameinfo:
> 
> int getnameinfo(socklen_t hostlen, socklen_t servlen;
>                        const struct sockaddr *restrict addr, socklen_t addrlen,
>                        char host[_Nullable restrict hostlen],
>                        socklen_t hostlen,
>                        char serv[_Nullable restrict servlen],
>                        socklen_t servlen,
>                        int flags);

That's fine.  You could try compiling it and you'll see it works as it
should.  Just ignore everything before the ';' within the parameter
list (those are forward declarations of parameters).

That's documented in
<https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html>.


Have a lovely night!
Alex

> 
> Best regards
> Torsten

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-09 19:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <280D0348-17CF-4A16-87BC-18D884101324@gi2.de>
2026-04-09 19:49 ` bug in signature of getnameinfo() Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.