… | |
… | |
117 | |
117 | |
118 | #include "libeio/eio.h" |
118 | #include "libeio/eio.h" |
119 | |
119 | |
120 | #ifndef POSIX_FADV_NORMAL |
120 | #ifndef POSIX_FADV_NORMAL |
121 | # define POSIX_FADV_NORMAL 0 |
121 | # define POSIX_FADV_NORMAL 0 |
|
|
122 | # define NO_FADVISE 1 |
122 | #endif |
123 | #endif |
123 | |
124 | |
124 | #ifndef POSIX_FADV_SEQUENTIAL |
125 | #ifndef POSIX_FADV_SEQUENTIAL |
125 | # define POSIX_FADV_SEQUENTIAL 0 |
126 | # define POSIX_FADV_SEQUENTIAL 0 |
126 | #endif |
127 | #endif |
… | |
… | |
1193 | int |
1194 | int |
1194 | fadvise (aio_rfd fh, off_t offset, off_t length, IV advice) |
1195 | fadvise (aio_rfd fh, off_t offset, off_t length, IV advice) |
1195 | PROTOTYPE: $$$$ |
1196 | PROTOTYPE: $$$$ |
1196 | CODE: |
1197 | CODE: |
1197 | { |
1198 | { |
1198 | #if _XOPEN_SOURCE >= 600 |
1199 | #if _XOPEN_SOURCE >= 600 && !NO_FADVISE |
1199 | RETVAL = posix_fadvise (fh, offset, length, advice); |
1200 | RETVAL = posix_fadvise (fh, offset, length, advice); |
1200 | #else |
1201 | #else |
1201 | RETVAL = errno = ENOSYS; |
1202 | RETVAL = errno = ENOSYS; |
1202 | #endif |
1203 | #endif |
1203 | } |
1204 | } |