Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / amd64-freebsd / posix_fallocate.c
blob8c045943799a0f2d2d64287eb0df067a9b68a711
1 #include <fcntl.h>
2 #include <stdio.h>
3 #include <errno.h>
5 int main(void)
7 int fd = open("foo", O_RDWR|O_CREAT, 0666);
8 if (fd < 0) return 1;
9 posix_fallocate(fd, 0, 400000);
11 int badfd = 42;
12 int x;
13 posix_fallocate(badfd, x, 20);
14 posix_fallocate(badfd, 0, x);
15 x = posix_fallocate(badfd, 0, 20);
16 if (x != EBADF)
17 fprintf(stderr, "Unexpected return value: %d\n", x);