[09/16] uclibc_0.9.32: Implement sync_file_range2.

Submitted by Khem Raj on July 19, 2011, 12:17 a.m.

Details

Message ID bcd71928a9187721cbbd00795a8bde5f2b503710.1311034342.git.raj.khem@gmail.com
State New, archived
Headers show

Commit Message

Khem Raj July 19, 2011, 12:17 a.m.
On some arches e.g. arm, ppc sync_file_range2 is used
instead of sync_file_range so we should consider that

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../uclibc/uclibc-0.9.32/sync_file_range2.patch    |   15 +++++++++++++++
 meta/recipes-core/uclibc/uclibc_0.9.32.bb          |    3 ++-
 2 files changed, 17 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch

Patch hide | download patch | download mbox

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 0000000..8ca2560
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-0.9.32/sync_file_range2.patch
@@ -0,0 +1,15 @@ 
+Index: git/libc/sysdeps/linux/common/sync_file_range.c
+===================================================================
+--- git.orig/libc/sysdeps/linux/common/sync_file_range.c	2011-07-16 19:19:40.000000000 -0700
++++ git/libc/sysdeps/linux/common/sync_file_range.c	2011-07-17 22:21:48.893808544 -0700
+@@ -10,7 +10,9 @@
+ #include <sys/syscall.h>
+ #if defined __USE_GNU
+ #include <fcntl.h>
+-
++#if defined __NR_sync_file_range2
++#define __NR_sync_file_range __NR_sync_file_range2
++#endif
+ #if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__
+ #define __NR___syscall_sync_file_range __NR_sync_file_range
+ static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd,
diff --git a/meta/recipes-core/uclibc/uclibc_0.9.32.bb b/meta/recipes-core/uclibc/uclibc_0.9.32.bb
index b959279..8dcb260 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 @@ 
 SRCREV="9152c4d67c763fde5712e2d181d92c0d7e1e2ab9"
 
 require uclibc.inc
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
 
 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 \
 	file://0001-mips-signalfd.h-SFD_NONBLOCK-for-mips-is-0200-unlike.patch \
 	file://uclibc-execvpe.patch \
 	file://uclibc_scheduler_update.patch \
+	file://sync_file_range2.patch \
 	"
 S = "${WORKDIR}/git"

Comments

Phil Blundell July 19, 2011, 11:07 a.m.
On Mon, 2011-07-18 at 17:17 -0700, Khem Raj wrote:
> ++#if defined __NR_sync_file_range2
> ++#define __NR_sync_file_range __NR_sync_file_range2
> ++#endif

Does that really work?  If I remember right, the argument lists for
those two syscalls are not the same.  It isn't entirely obvious to me
that it makes sense to just define one as an alias for the other.

p.
Khem Raj July 19, 2011, 2:45 p.m.
On Tue, Jul 19, 2011 at 4:07 AM, Phil Blundell <philb@gnu.org> wrote:
> On Mon, 2011-07-18 at 17:17 -0700, Khem Raj wrote:
>> ++#if defined __NR_sync_file_range2
>> ++#define __NR_sync_file_range __NR_sync_file_range2
>> ++#endif
>
> Does that really work?  If I remember right, the argument lists for
> those two syscalls are not the same.  It isn't entirely obvious to me
> that it makes sense to just define one as an alias for the other.
>
It wont work.
sent a wrong patch. I have a better one.

> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Khem Raj July 19, 2011, 9:14 p.m.
On Tue, Jul 19, 2011 at 7:45 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, Jul 19, 2011 at 4:07 AM, Phil Blundell <philb@gnu.org> wrote:
>> On Mon, 2011-07-18 at 17:17 -0700, Khem Raj wrote:
>>> ++#if defined __NR_sync_file_range2
>>> ++#define __NR_sync_file_range __NR_sync_file_range2
>>> ++#endif
>>
>> Does that really work?  If I remember right, the argument lists for
>> those two syscalls are not the same.  It isn't entirely obvious to me
>> that it makes sense to just define one as an alias for the other.
>>
> It wont work.
> sent a wrong patch. I have a better one.

I have updated this patch in the pull request tree.

>
>> p.
>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>