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
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).