From d166b1f5032eaeb9dd9e72db948a170af4710a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 20 Apr 2011 13:50:26 +0300 Subject: libc0.9.32: fix posix_fadvise64 on x86 --- ...01-posix_fadvise64-fix-x86-implementation.patch | 53 ++++++++++++++++++++++ main/libc0.9.32/APKBUILD | 4 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 main/libc0.9.32/0001-posix_fadvise64-fix-x86-implementation.patch (limited to 'main/libc0.9.32') diff --git a/main/libc0.9.32/0001-posix_fadvise64-fix-x86-implementation.patch b/main/libc0.9.32/0001-posix_fadvise64-fix-x86-implementation.patch new file mode 100644 index 000000000..382cc94ab --- /dev/null +++ b/main/libc0.9.32/0001-posix_fadvise64-fix-x86-implementation.patch @@ -0,0 +1,53 @@ +From d4db9d07a970e27e3042d09892fbaeca5f40c1a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Wed, 20 Apr 2011 13:45:36 +0300 +Subject: [PATCH] posix_fadvise64: fix x86 implementation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit 73d59554144f429b1cf0d4d7fa7de42bdf59ad92 completely broke +the x86 implementation of posix_fadvise64. It moved the first +the assembly code retn instruction gets missing depending on the + +Technically the file has two implementaions for posix_fadvise64, +one when __NR_fadvise64_64 is available, and second one if only +__NR_fadvise64 is there. Fix the #ifdef's to be proper for that. + +Signed-off-by: Timo Teräs +--- + libc/sysdeps/linux/i386/posix_fadvise64.S | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/libc/sysdeps/linux/i386/posix_fadvise64.S b/libc/sysdeps/linux/i386/posix_fadvise64.S +index b4aeff1..8a8947d 100644 +--- a/libc/sysdeps/linux/i386/posix_fadvise64.S ++++ b/libc/sysdeps/linux/i386/posix_fadvise64.S +@@ -22,7 +22,7 @@ + #include + #include + +-#if defined __NR_fadvise64_64 ++#if defined __NR_fadvise64_64 || defined __NR_fadvise64 + + /* Was named __libc_posix_fadvise64 for some inexplicable reason. + ** google says only uclibc has *__libc*_posix_fadviseXXX, +@@ -35,6 +35,7 @@ + .global posix_fadvise64 + .type posix_fadvise64,%function + posix_fadvise64: ++#if defined __NR_fadvise64_64 + /* Save regs */ + pushl %ebp + pushl %ebx +@@ -91,6 +92,7 @@ overflow: + + /* Returns 0 on success, else an error code. */ + negl %eax ++#endif + + /* Successful; return the syscall's value. */ + ret +-- +1.7.1 + diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD index 915a64a70..524f08aa2 100644 --- a/main/libc0.9.32/APKBUILD +++ b/main/libc0.9.32/APKBUILD @@ -4,7 +4,7 @@ pkgname=libc$_abiver _gitver= pkgver=0.9.32_rc3 _ver=${pkgver/_/-} -pkgrel=8 +pkgrel=9 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" @@ -30,6 +30,7 @@ source="http://uclibc.org/downloads/uClibc-${_ver}.tar.bz2 0001-malloc-standard-synchronize-on-fork.patch 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch + 0001-posix_fadvise64-fix-x86-implementation.patch uclibcconfig.x86 uclibcconfig.x86_64 uclibcconfig.i486 @@ -133,6 +134,7 @@ b4fb68ad3d0e8331b1b40c30eb21dfdc 0002-stdlib-fix-arc4random-return-type-to-u_in 30f27fe51fdc4d121166ad2af18dfb8d 0001-malloc-standard-synchronize-on-fork.patch 2ab8c375fe1cd406319b4c5ef538da2b 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 12f6297249755d3996918485bbd6031d 0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch +100d026c2d7cf7fc5906229448c791d4 0001-posix_fadvise64-fix-x86-implementation.patch b878bcfe02bf7a886ca85620fb330f56 uclibcconfig.x86 8048c16964e93d5971b8dff6726d5afa uclibcconfig.x86_64 b878bcfe02bf7a886ca85620fb330f56 uclibcconfig.i486 -- cgit v1.2.3