This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18231] New: ipc_perm struct's mode member has wrong type in sys/ipc.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:02:12 +0000
- Subject: [Bug libc/18231] New: ipc_perm struct's mode member has wrong type in sys/ipc.h
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18231
Bug ID: 18231
Summary: ipc_perm struct's mode member has wrong type in
sys/ipc.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
the ipc_perm mode member must have type mode_t, this works on some targets (eg
aarch64, linux) but broken on others (eg x86_64, linux)
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_ipc.h.html
the following code fails on x86_64 linux:
#define _XOPEN_SOURCE 700
#include <sys/ipc.h>
void f()
{
struct ipc_perm x;
mode_t *p = &x.mode; // warning: initialization from incompatible pointer type
[enabled by default]
}
--
You are receiving this mail because:
You are on the CC list for the bug.