public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant
@ 2011-04-30 10:37 bruno at clisp dot org
2011-04-30 10:40 ` [Bug libc/12717] " bruno at clisp dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bruno at clisp dot org @ 2011-04-30 10:37 UTC (permalink / raw)
To: glibc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/12717] declaration of getnameinfo() is not POSIX compliant
2011-04-30 10:37 [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant bruno at clisp dot org
@ 2011-04-30 10:40 ` bruno at clisp dot org
2011-05-02 1:38 ` drepper.fsp at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bruno at clisp dot org @ 2011-04-30 10:40 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12717
--- Comment #1 from Bruno Haible <bruno at clisp dot org> 2011-04-30 10:40:12 UTC ---
Created attachment 5698
--> http://sourceware.org/bugzilla/attachment.cgi?id=5698
proposed 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/12717] declaration of getnameinfo() is not POSIX compliant
2011-04-30 10:37 [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant bruno at clisp dot org
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-05-02 1:38 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12717
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-05-02 01:37:50 UTC ---
Applied to git.
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/12717] declaration of getnameinfo() is not POSIX compliant
2011-04-30 10:37 [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant bruno at clisp dot org
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
4 siblings, 0 replies; 6+ messages in thread
From: fzvqedi at u dot mintemail.com @ 2011-09-03 18:44 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12717
horst hornkeiler <fzvqedi at u dot mintemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fzvqedi at u dot
| |mintemail.com
--- Comment #3 from horst hornkeiler <fzvqedi at u dot mintemail.com> 2011-09-03 18:44:41 UTC ---
in which stable version of glibc is the fix first applied ?
i need to use the corresponding GLIBC version macros to make my program compile
on any platform.
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/12717] declaration of getnameinfo() is not POSIX compliant
2011-04-30 10:37 [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant bruno at clisp dot org
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: fzvqedi at u dot mintemail.com @ 2011-09-06 14:39 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12717
--- Comment #4 from horst hornkeiler <fzvqedi at u dot mintemail.com> 2011-09-06 14:39:33 UTC ---
i'm assuming from the date that the first fixed version is 2.14, which came out
~1month after the application to git.
please correct me if i'm mistaken.
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/12717] declaration of getnameinfo() is not POSIX compliant
2011-04-30 10:37 [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant bruno at clisp dot org
` (3 preceding siblings ...)
2011-09-06 14:39 ` fzvqedi at u dot mintemail.com
@ 2014-06-27 13:28 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 13:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=12717
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-27 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-30 10:37 [Bug libc/12717] New: declaration of getnameinfo() is not POSIX compliant bruno at clisp dot org
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
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).