1 /* vi: set sw=4 ts=4: */
3 * sync_file_range() for uClibc
5 * Copyright (C) 2008 Bernhard Reutner-Fischer <uclibc@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
14 #if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__
15 #define __NR___syscall_sync_file_range __NR_sync_file_range
16 static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd,
17 off_t, offset_hi, off_t, offset_lo,
18 off_t, nbytes_hi, off_t, nbytes_lo, unsigned int, flags)
19 int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
21 return __syscall_sync_file_range(fd,
22 __LONG_LONG_PAIR((long)(offset >> 32), (long)(offset & 0xffffffff)),
23 __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff)),
26 #elif defined __UCLIBC_HAS_STUBS__
27 int sync_file_range(int fd, __off64_t offset, __off64_t nbytes, unsigned int flags)