patches/uClibc/0.9.29/110-conditional-sched_affinity.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Mar 03 17:41:59 2009 +0000 (2009-03-03)
changeset 1219 2b875ed306c2
parent 108 69407950a2a2
permissions -rw-r--r--
Allow user to add a directory component in the sys-root path.
Rename CT_DEBUG_INSTALL_DIR to CT_DEBUGROOT_DIR (to match CT_SYSROOT_DIR).
As a side effect, fix creating lib64->lib symlinks.

/trunk/scripts/build/debug/100-dmalloc.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/400-ltrace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 6 3 3 0 +++---
/trunk/scripts/build/debug/500-strace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/200-duma.sh | 6 3 3 0 +++---
/trunk/scripts/crosstool-NG.sh.in | 16 7 9 0 +++++++---------
/trunk/scripts/functions | 2 1 1 0 +-
/trunk/config/toolchain.in | 17 17 0 0 +++++++++++++++++
8 files changed, 34 insertions(+), 19 deletions(-)
     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
     2 --- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c	2007-02-12 16:52:32.000000000 -0600
     3 +++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c	2007-05-09 18:05:09.397411811 -0500
     4 @@ -29,6 +29,7 @@
     5  #include <sys/param.h>
     6  #include <sys/types.h>
     7  
     8 +#ifdef __NR_sched_getaffinity
     9  libc_hidden_proto(memset)
    10  
    11  #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
    12 @@ -48,5 +49,15 @@
    13  	}
    14  	return res;
    15  }
    16 +#else
    17 +/*
    18 +int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
    19 +{
    20 +	__set_errno(ENOSYS);
    21 +	return -1;
    22 +}
    23 +*/
    24  #endif
    25  #endif
    26 +
    27 +#endif
    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
    29 --- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c	2007-02-12 16:52:32.000000000 -0600
    30 +++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c	2007-05-09 18:05:09.397411811 -0500
    31 @@ -31,6 +31,7 @@
    32  #include <sys/types.h>
    33  #include <alloca.h>
    34  
    35 +#ifdef __NR_sched_setaffinity
    36  libc_hidden_proto(getpid)
    37  
    38  #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
    39 @@ -74,5 +75,14 @@
    40  
    41  	return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
    42  }
    43 +#else
    44 +/*
    45 +int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
    46 +{
    47 +	__set_errno(ENOSYS);
    48 +	return -1;
    49 +}
    50 +*/
    51 +#endif
    52  #endif
    53  #endif