|
@@ -22,22 +22,23 @@
|
|
|
|
|
|
int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice)
|
|
|
{
|
|
|
+ int ret;
|
|
|
INTERNAL_SYSCALL_DECL (err);
|
|
|
|
|
|
#if defined (__arm__) || \
|
|
|
(defined(__UCLIBC_SYSCALL_ALIGN_64BIT__) && (defined(__powerpc__) || defined(__xtensa__)))
|
|
|
|
|
|
* custom syscall handler (rearranges @advice to avoid register hole punch) */
|
|
|
- int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
|
|
|
+ ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
|
|
|
OFF64_HI_LO (offset), OFF64_HI_LO (len));
|
|
|
#elif defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
|
|
|
|
|
|
* stock syscall handler in kernel (reg hole punched) */
|
|
|
- int ret = INTERNAL_SYSCALL (fadvise64_64, err, 7, fd, 0,
|
|
|
+ ret = INTERNAL_SYSCALL (fadvise64_64, err, 7, fd, 0,
|
|
|
OFF64_HI_LO (offset), OFF64_HI_LO (len),
|
|
|
advice);
|
|
|
# else
|
|
|
- int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
|
|
|
+ ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
|
|
|
OFF64_HI_LO (offset), OFF64_HI_LO (len),
|
|
|
advice);
|
|
|
# endif
|