summaryrefslogtreecommitdiff
path: root/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch
blob: a450d66ae70287d92b53f2a18e2e26c557fb1446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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