Bug 16747

Summary: the declaration of lio_listio is missing a restrict qualifier
Product: glibc Reporter: Szabolcs Nagy <nszabolcs>
Component: librtAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: drepper.fsp
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Szabolcs Nagy 2014-03-24 17:40:05 UTC
lio_listio is declared in glibc as

	extern int lio_listio (int __mode,
			       struct aiocb *const __list[__restrict_arr],
			       int __nent, struct sigevent *__restrict __sig)
	  __THROW __nonnull ((2));

but the standard prototype is http://pubs.opengroup.org/onlinepubs/9699919799/functions/lio_listio.html

	int lio_listio(int, struct aiocb *restrict const *restrict, int, struct sigevent *restrict);

note the two restrict qualifiers in the second argument

these two prototypes are not compatible
Comment 1 jsm-csl@polyomino.org.uk 2014-03-24 18:27:32 UTC
A fix should make the extra restrict conditional on __USE_XOPEN2K, given 
that it's not there in older standards and affects type compatibility 
(unlike most uses of restrict which are only on the parameters themselves 
and so don't affect type compatibility).