Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / linux / check_preadv2_pwritev2.c
bloba91caa6426c330c3d6188ee41180401c61ed5ca7
1 #include <sys/syscall.h>
2 #include <errno.h>
3 #include <unistd.h>
4 #include <stddef.h>
6 int main(int argc, char **argv)
8 int has_preadv2 = 0;
9 int has_pwritev2 = 0;
10 #if defined(__NR_preadv2)
11 errno = 0;
12 syscall(__NR_preadv2, 0, NULL, 0, 0, 0);
13 has_preadv2 = errno != ENOSYS;
14 #else
15 has_preadv2 = 0;
16 #endif
18 #if defined(__NR_pwritev2)
19 errno = 0;
20 syscall(__NR_pwritev2, 0, NULL, 0, 0, 0);
21 has_pwritev2 = errno != ENOSYS;
22 #else
23 has_pwritev2 = 0;
24 #endif
26 return !(has_preadv2 && has_pwritev2);