1 // RUN: %clangxx -O0 %s -o %t
10 #if !defined(__GLIBC_PREREQ)
11 #define __GLIBC_PREREQ(a, b) 0
14 #if !__GLIBC_PREREQ(2, 26)
15 #define preadv2(a, b, c, d, e) preadv(a, b, c, d)
19 int fd
= open("/proc/self/stat", O_RDONLY
);
23 vec
[0].iov_base
= bufa
+ 4;
25 vec
[1].iov_base
= bufb
;
26 vec
[1].iov_len
= sizeof(bufb
);
27 ssize_t rd
= preadv2(fd
, vec
, 2, 0, 0);
29 vec
[0].iov_base
= bufa
;
30 rd
= preadv2(fd
, vec
, 2, 0, 0);
32 rd
= preadv2(fd
, vec
, 5, -25, 0);