patches/uClibc/0.9.29/110-conditional-sched_affinity.patch
author Remy Bohmer <linux@bohmer.net>
Thu May 27 23:18:19 2010 +0200 (2010-05-27)
changeset 2060 51e4597b07fc
parent 108 69407950a2a2
permissions -rw-r--r--
scripts: add option to strip all toolchain executables

To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
yann@108
     1
diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c
yann@108
     2
--- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c	2007-02-12 16:52:32.000000000 -0600
yann@108
     3
+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c	2007-05-09 18:05:09.397411811 -0500
yann@108
     4
@@ -29,6 +29,7 @@
yann@108
     5
 #include <sys/param.h>
yann@108
     6
 #include <sys/types.h>
yann@108
     7
 
yann@108
     8
+#ifdef __NR_sched_getaffinity
yann@108
     9
 libc_hidden_proto(memset)
yann@108
    10
 
yann@108
    11
 #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
yann@108
    12
@@ -48,5 +49,15 @@
yann@108
    13
 	}
yann@108
    14
 	return res;
yann@108
    15
 }
yann@108
    16
+#else
yann@108
    17
+/*
yann@108
    18
+int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
yann@108
    19
+{
yann@108
    20
+	__set_errno(ENOSYS);
yann@108
    21
+	return -1;
yann@108
    22
+}
yann@108
    23
+*/
yann@108
    24
 #endif
yann@108
    25
 #endif
yann@108
    26
+
yann@108
    27
+#endif
yann@108
    28
diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c
yann@108
    29
--- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c	2007-02-12 16:52:32.000000000 -0600
yann@108
    30
+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c	2007-05-09 18:05:09.397411811 -0500
yann@108
    31
@@ -31,6 +31,7 @@
yann@108
    32
 #include <sys/types.h>
yann@108
    33
 #include <alloca.h>
yann@108
    34
 
yann@108
    35
+#ifdef __NR_sched_setaffinity
yann@108
    36
 libc_hidden_proto(getpid)
yann@108
    37
 
yann@108
    38
 #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
yann@108
    39
@@ -74,5 +75,14 @@
yann@108
    40
 
yann@108
    41
 	return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
yann@108
    42
 }
yann@108
    43
+#else
yann@108
    44
+/*
yann@108
    45
+int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
yann@108
    46
+{
yann@108
    47
+	__set_errno(ENOSYS);
yann@108
    48
+	return -1;
yann@108
    49
+}
yann@108
    50
+*/
yann@108
    51
+#endif
yann@108
    52
 #endif
yann@108
    53
 #endif