summaryrefslogtreecommitdiffstats
path: root/recipes/klibc/klibc-1.5.20/getrusage.patch
diff options
context:
space:
mode:
authorCliff Brake <cbrake@bec-systems.com>2010-09-13 14:15:35 -0400
committerCliff Brake <cbrake@bec-systems.com>2010-09-13 14:15:35 -0400
commit4ee358534793381d2e87b01781079a3354fd5c1c (patch)
tree729f8b0ce4bdbcd8a16f561fb68da0d66c3a3eb8 /recipes/klibc/klibc-1.5.20/getrusage.patch
parentbeb17e26ee9b4bc0cf334c3b30560c6eb66b1299 (diff)
parenteda06ec3dde6169a46797f876a82499c4fff8f62 (diff)
downloadopenembedded-324a7c75ac7f591e950836686bfe14332ce6586b.tar.gz
Merge branch 'org.openembedded.dev' into testing-nexttesting_2010-09-13
Diffstat (limited to 'recipes/klibc/klibc-1.5.20/getrusage.patch')
-rw-r--r--recipes/klibc/klibc-1.5.20/getrusage.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes/klibc/klibc-1.5.20/getrusage.patch b/recipes/klibc/klibc-1.5.20/getrusage.patch
new file mode 100644
index 0000000000..224ab321d7
--- /dev/null
+++ b/recipes/klibc/klibc-1.5.20/getrusage.patch
@@ -0,0 +1,34 @@
+linux-libc-dev: <linux/resource.h> getrusage() prototype should be protected from user space
+see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575381
+guard added with 2.6.32
+Index: klibc-1.5.19/usr/include/sys/resource.h
+===================================================================
+--- klibc-1.5.19.old/usr/include/sys/resource.h 2010-07-07 14:07:48.000000000 +0200
++++ klibc-1.5.19/usr/include/sys/resource.h 2010-08-16 01:51:14.000000000 +0200
+@@ -12,6 +12,9 @@
+ __extern int getpriority(int, int);
+ __extern int setpriority(int, int, int);
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
+ __extern int getrusage(int, struct rusage *);
++#endif
+
+ #endif /* _SYS_RESOURCE_H */
+Index: klibc-1.5.19/usr/klibc/SYSCALLS.def
+===================================================================
+--- klibc-1.5.19.old/usr/klibc/SYSCALLS.def 2010-08-16 01:49:02.000000000 +0200
++++ klibc-1.5.19/usr/klibc/SYSCALLS.def 2010-08-16 01:55:07.000000000 +0200
+@@ -49,7 +49,12 @@
+ <alpha,ia64> int getpriority(int, int);
+ <!alpha,ia64> int getpriority::__getpriority(int, int);
+ int setpriority(int, int, int);
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
+ int getrusage(int, struct rusage *);
++#endif
++
+ int sched_setscheduler(pid_t, int, const struct sched_param *);
+ int sched_yield();
+ <i386> int prctl@varadic(int, unsigned long, unsigned long, unsigned long, unsigned long);