blob: 25373bcd52c4ed7f84ac67b226372695b58a9a42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* vi: set sw=4 ts=4: */
/*
* posix_fadvise() for uClibc
*
* Copyright (C) 2008 Bernhard Reutner-Fischer <uclibc@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <sys/syscall.h>
#if defined __USE_GNU
#include <fcntl.h>
#if defined __NR_fadvise64_64 || defined __NR_fadvise64
extern int __libc_posix_fadvise64 (int, __off64_t, __off64_t, int ) __THROW;
libc_hidden_proto(__libc_posix_fadvise64)
libc_hidden_proto(posix_fadvise)
int posix_fadvise(int fd, off_t offset, off_t len, int advice)
{
if (__libc_posix_fadvise64(fd, offset, len, advice) != 0)
return errno;
return 0;
}
libc_hidden_def(posix_fadvise)
#elif defined __UCLIBC_HAS_STUBS__
libc_hidden_proto(posix_fadvise)
int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused,
off_t len attribute_unused, int advice attribute_unused)
{
return ENOSYS;
}
libc_hidden_def(posix_fadvise)
#endif
#endif
|