public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bruno at clisp dot org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant Date: Sat, 30 Apr 2011 10:37:00 -0000 [thread overview] Message-ID: <bug-12717-131@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=12717 Summary: declaration of getnameinfo() is not POSIX compliant Product: glibc Version: 2.13 Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper.fsp@gmail.com ReportedBy: bruno@clisp.org POSIX:2008 specifies the declaration of getnameinfo() in http://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html In particular, the last parameter should be an 'int'. In glibc's <netdb.h>, the parameter is an 'unsigned int'. This leads to a compilation error for POSIX compliant programs. How to reproduce: ============================== foo.cc ============================== #include <netdb.h> int (*getnameinfo_ptr) (const struct sockaddr *sa, socklen_t salen, char *node, socklen_t nodelen, char *service, socklen_t servicelen, int flags) = getnameinfo; ==================================================================== $ g++ -c foo.cc foo.cc:5: error: invalid conversion from ‘int (*)(const sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, unsigned int)’ to ‘int (*)(const sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int)’ Attached is a probable fix (untested). -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2011-04-30 10:37 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-30 10:37 bruno at clisp dot org [this message] 2011-04-30 10:40 ` [Bug libc/12717] " bruno at clisp dot org 2011-05-02 1:38 ` drepper.fsp at gmail dot com 2011-09-03 18:44 ` fzvqedi at u dot mintemail.com 2011-09-06 14:39 ` fzvqedi at u dot mintemail.com 2014-06-27 13:28 ` fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-12717-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).