patches/uClibc/0.9.29/110-conditional-sched_affinity.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jan 17 23:06:02 2010 +0100 (2010-01-17)
changeset 1740 c57458bb354d
parent 108 69407950a2a2
permissions -rw-r--r--
configure: do not require hg when configuring in an hg clone

When configuring in an hg clone, we need hg to compute the version string.
It can happen that users do not have Mercurial (eg. if they got a snapshot
rather that they did a full clone). In this case, we can still run, of
course, so simply fill the version string with a sufficiently explicit
value, that does not require hg. The date is a good candidate.
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