This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18233] New: msghdr and cmsghdr types are not POSIX conform in sys/socket.h
- From: "nszabolcs at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 10 Apr 2015 10:10:23 +0000
- Subject: [Bug libc/18233] New: msghdr and cmsghdr types are not POSIX conform in sys/socket.h
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18233
Bug ID: 18233
Summary: msghdr and cmsghdr types are not POSIX conform in
sys/socket.h
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: nszabolcs at gmail dot com
CC: drepper.fsp at gmail dot com
msg_iovlen, msg_controllen and cmsg_len have wrong types
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
the following code fails on linux:
#define _POSIX_C_SOURCE 200809L
#include <sys/socket.h>
void f()
{
struct msghdr x;
struct cmsghdr y;
int *p = &x.msg_iovlen; // warning: initialization from incompatible pointer
type [enabled by default]
socklen_t *q = &x.msg_controllen; // likewise
socklen_t *r = &y.cmsg_len;
}
--
You are receiving this mail because:
You are on the CC list for the bug.