aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32
diff options
context:
space:
mode:
Diffstat (limited to 'main/libc0.9.32')
-rw-r--r--main/libc0.9.32/0001-add-posix_madvise.c.patch60
-rw-r--r--main/libc0.9.32/APKBUILD9
-rw-r--r--main/libc0.9.32/posix_fallocate.patch (renamed from main/libc0.9.32/0001-libc-add-posix_fallocate.patch)30
3 files changed, 79 insertions, 20 deletions
diff --git a/main/libc0.9.32/0001-add-posix_madvise.c.patch b/main/libc0.9.32/0001-add-posix_madvise.c.patch
new file mode 100644
index 0000000000..5b8ca538a9
--- /dev/null
+++ b/main/libc0.9.32/0001-add-posix_madvise.c.patch
@@ -0,0 +1,60 @@
+From 9d101732ad0609f2f19ef20062a00cd26b01d859 Mon Sep 17 00:00:00 2001
+From: "Peter S. Mazinger" <ps.m@gmx.net>
+Date: Tue, 26 Apr 2011 23:03:44 +0200
+Subject: [PATCH] add posix_madvise.c
+
+Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/sysdeps/linux/common/Makefile.in | 2 +-
+ libc/sysdeps/linux/common/posix_madvise.c | 25 +++++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+ create mode 100644 libc/sysdeps/linux/common/posix_madvise.c
+
+diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
+index cf9f25a..b40bb78 100644
+--- a/libc/sysdeps/linux/common/Makefile.in
++++ b/libc/sysdeps/linux/common/Makefile.in
+@@ -81,7 +81,7 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
+ sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
+ sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c
+ # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait
+-CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c
++CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c
+ CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c
+ CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c
+ CSRC-$(UCLIBC_HAS_XATTR) += xattr.c
+diff --git a/libc/sysdeps/linux/common/posix_madvise.c b/libc/sysdeps/linux/common/posix_madvise.c
+new file mode 100644
+index 0000000..2f95bcb
+--- /dev/null
++++ b/libc/sysdeps/linux/common/posix_madvise.c
+@@ -0,0 +1,25 @@
++/* vi: set sw=4 ts=4: */
++/* Licensed under the LGPL v2.1, see the file LICENSE in this tarball. */
++
++#include <sys/mman.h>
++#include <sys/syscall.h>
++
++#if defined __NR_madvise && defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
++int posix_madvise(void *addr, size_t len, int advice)
++{
++ int result;
++ /* We have one problem: the kernel's MADV_DONTNEED does not
++ * correspond to POSIX's POSIX_MADV_DONTNEED. The former simply
++ * discards changes made to the memory without writing it back to
++ * disk, if this would be necessary. The POSIX behaviour does not
++ * allow this. There is no functionality mapping for the POSIX
++ * behaviour so far so we ignore that advice for now. */
++ if (advice == POSIX_MADV_DONTNEED)
++ return 0;
++
++ /* this part might use madvise function */
++ INTERNAL_SYSCALL_DECL (err);
++ result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice);
++ return INTERNAL_SYSCALL_ERRNO (result, err);
++}
++#endif
+--
+1.7.11.1
+
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
index 326c5075c5..aa6dbebbfe 100644
--- a/main/libc0.9.32/APKBUILD
+++ b/main/libc0.9.32/APKBUILD
@@ -4,7 +4,7 @@ pkgname=libc$_abiver
_gitver=
pkgver=0.9.33.2
_ver=${pkgver/_/-}
-pkgrel=6
+pkgrel=7
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -34,7 +34,9 @@ source="http://uclibc.org/downloads/uClibc-${_ver}.tar.xz
0008-ldso-limited-support-for-ORIGIN-in-rpath.patch
eventfd.patch
uClibc-0.9.33-avahi.patch
-0001-libc-add-posix_fallocate.patch
+
+ 0001-add-posix_madvise.c.patch
+ posix_fallocate.patch
posix_fallocate-fix.patch
0001-cancel.h-add-generic-file-to-ease-cancellation-suppo.patch
@@ -147,7 +149,8 @@ d9611de57fb72b74c0b9e243b8e9165b 0007-libc-x86-fix-stack-unwinding-and-backtrac
12cf5330b092ee7e00d14909737abc70 0008-ldso-limited-support-for-ORIGIN-in-rpath.patch
a86eb40e8aca531a1cfee5faff3c53d4 eventfd.patch
d91fcb785ae14632a4ea8fa03ba0236f uClibc-0.9.33-avahi.patch
-08297e76052108d95303efe7d8745444 0001-libc-add-posix_fallocate.patch
+f88dac5fe54a1bffce7d1ff4b53a755c 0001-add-posix_madvise.c.patch
+ddc2778790a0f3537828c2c3dbcdb042 posix_fallocate.patch
a93a0e50e73bb6e8d8abf6e4340378b6 posix_fallocate-fix.patch
085d98078455ad0f0c2d63c6fa9ea67c 0001-cancel.h-add-generic-file-to-ease-cancellation-suppo.patch
583a8b6d4a29abe0b6ac449a1694b079 0002-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch
diff --git a/main/libc0.9.32/0001-libc-add-posix_fallocate.patch b/main/libc0.9.32/posix_fallocate.patch
index 560a94b0b4..da6f5a9464 100644
--- a/main/libc0.9.32/0001-libc-add-posix_fallocate.patch
+++ b/main/libc0.9.32/posix_fallocate.patch
@@ -4,6 +4,7 @@ Date: Tue, 12 Jun 2012 07:59:16 +0000
Subject: [PATCH] libc: add posix_fallocate
http://www.mail-archive.com/uclibc@uclibc.org/msg08105.html
+
---
include/fcntl.h | 4 +-
libc/sysdeps/linux/common/Makefile.in | 3 +-
@@ -34,20 +35,6 @@ index 26ad1fe..c4a47af 100644
/* Reserve storage for the data of the file associated with FD.
-diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
-index 3b5763c..cddcd74 100644
---- a/libc/sysdeps/linux/common/Makefile.in
-+++ b/libc/sysdeps/linux/common/Makefile.in
-@@ -81,7 +81,8 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
- sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
- sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c
- # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait
--CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c
-+CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c \
-+ posix_fallocate.c posix_fallocate64.c
- CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c
- CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c
- CSRC-$(UCLIBC_HAS_XATTR) += xattr.c
diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h
index 5ea85d2..be00dda 100644
--- a/libc/sysdeps/linux/common/bits/kernel-features.h
@@ -341,6 +328,15 @@ index 0000000..eec50ea
+
+ return 0;
+}
---
-1.7.10.3
-
+--- ./libc/sysdeps/linux/common/Makefile.in.orig
++++ ./libc/sysdeps/linux/common/Makefile.in
+@@ -81,7 +81,8 @@
+ sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
+ sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c
+ # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait
+-CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c
++CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c \
++ posix_madvise.c posix_fallocate.c posix_fallocate64.c
+ CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c
+ CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c
+ CSRC-$(UCLIBC_HAS_XATTR) += xattr.c