diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-07-18 15:39:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-20 15:27:38 +0100 |
commit | 00463a3343f248c36ca46ae34ff6cd67a47337c0 (patch) | |
tree | b7010657990088b82627c025170e66857ef45e15 /meta | |
parent | e182d213614da43652431e013f7c2f7b8e2fb872 (diff) | |
download | poky-00463a3343f248c36ca46ae34ff6cd67a47337c0.tar.gz |
uclibc_0.9.32: Implement sync_file_range2.
On some arches e.g. arm, ppc sync_file_range2 is used
instead of sync_file_range so we should consider that
(From OE-Core rev: c480def3a3531577659a9cc0f10640f3df047bc2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch | 40 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/uclibc_0.9.32.bb | 3 |
2 files changed, 42 insertions, 1 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 new file mode 100644 index 0000000000..b5e972edd5 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | Index: git/libc/sysdeps/linux/common/sync_file_range.c | ||
2 | =================================================================== | ||
3 | --- git.orig/libc/sysdeps/linux/common/sync_file_range.c 2011-07-19 14:23:35.000000000 -0700 | ||
4 | +++ git/libc/sysdeps/linux/common/sync_file_range.c 2011-07-19 15:04:38.631808666 -0700 | ||
5 | @@ -11,7 +11,8 @@ | ||
6 | #if defined __USE_GNU | ||
7 | #include <fcntl.h> | ||
8 | |||
9 | -#if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__ | ||
10 | +#if defined __UCLIBC_HAS_LFS__ | ||
11 | +#if defined __NR_sync_file_range | ||
12 | #define __NR___syscall_sync_file_range __NR_sync_file_range | ||
13 | static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd, | ||
14 | off_t, offset_hi, off_t, offset_lo, | ||
15 | @@ -23,5 +24,23 @@ | ||
16 | __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff)), | ||
17 | flags); | ||
18 | } | ||
19 | -#endif | ||
20 | -#endif | ||
21 | +#elif defined __NR_sync_file_range2 | ||
22 | +#define __NR___syscall_sync_file_range2 __NR_sync_file_range2 | ||
23 | +static __inline__ _syscall6(int, __syscall_sync_file_range2, int, fd, | ||
24 | + unsigned int, flags, off_t, offset_hi, off_t, offset_lo, | ||
25 | + off_t, nbytes_hi, off_t, nbytes_lo) | ||
26 | +int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags) | ||
27 | +{ | ||
28 | + return __syscall_sync_file_range2(fd, flags, | ||
29 | + __LONG_LONG_PAIR((long)(offset >> 32), (long)(offset & 0xffffffff)), | ||
30 | + __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff))); | ||
31 | +} | ||
32 | +#else | ||
33 | +int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags) | ||
34 | +{ | ||
35 | + __set_errno (ENOSYS); | ||
36 | + return -1 | ||
37 | +} | ||
38 | +#endif /* __NR_sync_file_range */ | ||
39 | +#endif /* __UCLIBC_HAS_LFS__ */ | ||
40 | +#endif /* __USE_GNU */ | ||
diff --git a/meta/recipes-core/uclibc/uclibc_0.9.32.bb b/meta/recipes-core/uclibc/uclibc_0.9.32.bb index b9592796f3..8dcb2605eb 100644 --- a/meta/recipes-core/uclibc/uclibc_0.9.32.bb +++ b/meta/recipes-core/uclibc/uclibc_0.9.32.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SRCREV="9152c4d67c763fde5712e2d181d92c0d7e1e2ab9" | 1 | SRCREV="9152c4d67c763fde5712e2d181d92c0d7e1e2ab9" |
2 | 2 | ||
3 | require uclibc.inc | 3 | require uclibc.inc |
4 | PR = "${INC_PR}.1" | 4 | PR = "${INC_PR}.2" |
5 | PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc" | 5 | PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc" |
6 | 6 | ||
7 | SRC_URI = "git://uclibc.org/uClibc.git;branch=${PV};protocol=git \ | 7 | SRC_URI = "git://uclibc.org/uClibc.git;branch=${PV};protocol=git \ |
@@ -28,5 +28,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=${PV};protocol=git \ | |||
28 | file://0001-mips-signalfd.h-SFD_NONBLOCK-for-mips-is-0200-unlike.patch \ | 28 | file://0001-mips-signalfd.h-SFD_NONBLOCK-for-mips-is-0200-unlike.patch \ |
29 | file://uclibc-execvpe.patch \ | 29 | file://uclibc-execvpe.patch \ |
30 | file://uclibc_scheduler_update.patch \ | 30 | file://uclibc_scheduler_update.patch \ |
31 | file://sync_file_range2.patch \ | ||
31 | " | 32 | " |
32 | S = "${WORKDIR}/git" | 33 | S = "${WORKDIR}/git" |