diff options
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch b/meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch deleted file mode 100644 index 4b85a43e8a..0000000000 --- a/meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | Some architectures like ppc, arm use aligned 64 bit inputs so a register is not wasted | ||
2 | this then uses __NR_sync_file_range2 syscall. Implement is | ||
3 | |||
4 | Singed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Index: git/libc/sysdeps/linux/common/sync_file_range.c | ||
9 | =================================================================== | ||
10 | --- git.orig/libc/sysdeps/linux/common/sync_file_range.c 2011-07-19 14:23:35.000000000 -0700 | ||
11 | +++ git/libc/sysdeps/linux/common/sync_file_range.c 2011-07-19 15:04:38.631808666 -0700 | ||
12 | @@ -11,7 +11,8 @@ | ||
13 | #if defined __USE_GNU | ||
14 | #include <fcntl.h> | ||
15 | |||
16 | -#if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__ | ||
17 | +#if defined __UCLIBC_HAS_LFS__ | ||
18 | +#if defined __NR_sync_file_range | ||
19 | #define __NR___syscall_sync_file_range __NR_sync_file_range | ||
20 | static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd, | ||
21 | off_t, offset_hi, off_t, offset_lo, | ||
22 | @@ -23,5 +24,23 @@ | ||
23 | __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff)), | ||
24 | flags); | ||
25 | } | ||
26 | -#endif | ||
27 | -#endif | ||
28 | +#elif defined __NR_sync_file_range2 | ||
29 | +#define __NR___syscall_sync_file_range2 __NR_sync_file_range2 | ||
30 | +static __inline__ _syscall6(int, __syscall_sync_file_range2, int, fd, | ||
31 | + unsigned int, flags, off_t, offset_hi, off_t, offset_lo, | ||
32 | + off_t, nbytes_hi, off_t, nbytes_lo) | ||
33 | +int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags) | ||
34 | +{ | ||
35 | + return __syscall_sync_file_range2(fd, flags, | ||
36 | + __LONG_LONG_PAIR((long)(offset >> 32), (long)(offset & 0xffffffff)), | ||
37 | + __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff))); | ||
38 | +} | ||
39 | +#else | ||
40 | +int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags) | ||
41 | +{ | ||
42 | + __set_errno (ENOSYS); | ||
43 | + return -1 | ||
44 | +} | ||
45 | +#endif /* __NR_sync_file_range */ | ||
46 | +#endif /* __UCLIBC_HAS_LFS__ */ | ||
47 | +#endif /* __USE_GNU */ | ||