Add missing prototype for readahead in <fcntl.h>.
Change-Id: Icfe85e9cf95c657b495c4e9cd10dec50b0b8f6db
This commit is contained in:
parent
c9291e1bb5
commit
55147ada3c
2 changed files with 11 additions and 0 deletions
|
@ -86,6 +86,10 @@ extern int fallocate64(int, int, off64_t, off64_t);
|
|||
extern int posix_fadvise64(int, off64_t, off64_t, int);
|
||||
extern int posix_fallocate64(int, off64_t, off64_t);
|
||||
|
||||
#if defined(__USE_GNU)
|
||||
ssize_t readahead(int, off64_t, size_t);
|
||||
#endif
|
||||
|
||||
extern int __open_2(const char*, int);
|
||||
extern int __open_real(const char*, int, ...) __RENAME(open);
|
||||
extern int __openat_2(int, const char*, int);
|
||||
|
|
|
@ -237,3 +237,10 @@ TEST(fcntl, tee) {
|
|||
ASSERT_STREQ(expected, buf1);
|
||||
ASSERT_STREQ(expected, buf2);
|
||||
}
|
||||
|
||||
TEST(fcntl, readahead) {
|
||||
// Just check that the function is available.
|
||||
errno = 0;
|
||||
ASSERT_EQ(-1, readahead(-1, 0, 123));
|
||||
ASSERT_EQ(EBADF, errno);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue