patches/uClibc/0.9.29/110-conditional-sched_affinity.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu Apr 26 19:55:59 2012 -0600 (2012-04-26)
changeset 2939 58974be61289
parent 108 69407950a2a2
permissions -rw-r--r--
Allow multi-word "install" command.

Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"

# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory

# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
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