summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-02-14 13:28:58 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-02-14 13:28:58 +0000
commitf11476c1811175b388f035c6b728b5dce66e054b (patch)
treea7aa55ddeea50f8b11a55e3c57fef7a25d40a6db /toolchain
parente3b7510da0d54bcd70bb508bdeaf60f97d47ecf6 (diff)
- sched_{s,g}etaffinity depends on the respective syscalls.
Noticed while trying to use ancient 2.4.31 kernel-headers from some bug-report
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch b/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch
new file mode 100644
index 000000000..a450d66ae
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch
@@ -0,0 +1,55 @@
+Index: uClibc/libc/sysdeps/linux/common/sched_getaffinity.c
+===================================================================
+--- uClibc/libc/sysdeps/linux/common/sched_getaffinity.c (revision 17880)
++++ uClibc/libc/sysdeps/linux/common/sched_getaffinity.c (working copy)
+@@ -29,6 +29,7 @@
+ #include <sys/param.h>
+ #include <sys/types.h>
+
++#ifdef __NR_sched_getaffinity
+ libc_hidden_proto(memset)
+
+ #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
+@@ -48,5 +49,15 @@
+ }
+ return res;
+ }
++#else
++/*
++int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
++{
++ __set_errno(ENOSYS);
++ return -1;
++}
++*/
+ #endif
+ #endif
++
++#endif
+Index: uClibc/libc/sysdeps/linux/common/sched_setaffinity.c
+===================================================================
+--- uClibc/libc/sysdeps/linux/common/sched_setaffinity.c (revision 17880)
++++ uClibc/libc/sysdeps/linux/common/sched_setaffinity.c (working copy)
+@@ -31,6 +31,7 @@
+ #include <sys/types.h>
+ #include <alloca.h>
+
++#ifdef __NR_sched_setaffinity
+ libc_hidden_proto(getpid)
+
+ #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
+@@ -74,5 +75,14 @@
+
+ return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
+ }
++#else
++/*
++int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
++{
++ __set_errno(ENOSYS);
++ return -1;
++}
++*/
+ #endif
+ #endif
++#endif