patches/uClibc/0.9.29/110-conditional-sched_affinity.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 18 23:00:46 2011 +0200 (2011-05-18)
changeset 2467 200836977ce6
parent 108 69407950a2a2
permissions -rw-r--r--
config: rename variables that are arrays

Make it explicit that a variable is an array bu the name of the variable.
It will be used later when .config gets munged to allow both multiple
arguments and arguments with spaces at the same time to be passed from the
configuration down to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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