klibc-1.5.15: fix build against 2.6.31 linux headers
authorJeremy Lainé <jeremy.laine@m4x.org>
Tue, 27 Oct 2009 17:46:05 +0000 (18:46 +0100)
committerJeremy Lainé <jeremy.laine@m4x.org>
Tue, 27 Oct 2009 17:46:05 +0000 (18:46 +0100)
* apply patches from Ubuntu to build against 2.6.31 linux headers

recipes/klibc/klibc-1.5.15/mntproc-definitions.patch [new file with mode: 0644]
recipes/klibc/klibc-1.5.15/signal-cleanup.patch [new file with mode: 0644]
recipes/klibc/klibc_1.5.15.bb
recipes/klibc/klibc_1.5.15.inc

diff --git a/recipes/klibc/klibc-1.5.15/mntproc-definitions.patch b/recipes/klibc/klibc-1.5.15/mntproc-definitions.patch
new file mode 100644 (file)
index 0000000..eea606b
--- /dev/null
@@ -0,0 +1,20 @@
+Description: MNTPROC_MNT and MNTPROC_UMNT are no longer defined by the
+ kernel. Hack around this by restoring the old definitions.
+Upstream: http://thread.gmane.org/gmane.linux.nfs/28059 suggests a better
+ fix is in progress.
+
+diff -Nur -x '*.orig' -x '*~' klibc-1.5.15/usr/kinit/nfsmount/mount.c klibc-1.5.15.new/usr/kinit/nfsmount/mount.c
+--- klibc-1.5.15/usr/kinit/nfsmount/mount.c    2009-01-04 19:28:03.000000000 +0000
++++ klibc-1.5.15.new/usr/kinit/nfsmount/mount.c        2009-10-04 22:52:44.000000000 +0100
+@@ -44,6 +44,11 @@
+ #define MNT_REPLY_MINSIZE (sizeof(struct rpc_reply) + sizeof(uint32_t))
++#ifndef MNTPROC_MNT
++#  define MNTPROC_MNT 1
++#  define MNTPROC_UMNT        3
++#endif /* MNTPROC_MNT */
++
+ static int get_ports(uint32_t server, const struct nfs_mount_data *data)
+ {
+       uint32_t nfs_ver, mount_ver;
diff --git a/recipes/klibc/klibc-1.5.15/signal-cleanup.patch b/recipes/klibc/klibc-1.5.15/signal-cleanup.patch
new file mode 100644 (file)
index 0000000..fd41f4d
--- /dev/null
@@ -0,0 +1,32 @@
+Description: Cope with header changes in kernel commit
+ 63b852a6b67d0820d388b0ecd0da83ccb4048b8d.
+
+diff -Nur -x '*.orig' -x '*~' klibc-1.5.15/usr/include/arch/i386/klibc/archsignal.h klibc-1.5.15.new/usr/include/arch/i386/klibc/archsignal.h
+--- klibc-1.5.15/usr/include/arch/i386/klibc/archsignal.h      2009-10-04 23:10:17.000000000 +0100
++++ klibc-1.5.15.new/usr/include/arch/i386/klibc/archsignal.h  2009-10-05 09:35:14.000000000 +0100
+@@ -96,7 +96,7 @@
+ #define MINSIGSTKSZ   2048
+ #define SIGSTKSZ      8192
+-#include <asm-generic/signal.h>
++#include <asm-generic/signal-defs.h>
+ /* This uses gcc anonymous union support... */
+ struct siginfo;
+diff -Nur -x '*.orig' -x '*~' klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h klibc-1.5.15.new/usr/include/arch/sparc/klibc/archsignal.h
+--- klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h     2009-01-04 19:28:03.000000000 +0000
++++ klibc-1.5.15.new/usr/include/arch/sparc/klibc/archsignal.h 2009-10-05 09:37:31.000000000 +0100
+@@ -11,13 +11,6 @@
+ #define __WANT_POSIX1B_SIGNALS__
+ #include <asm/signal.h>
+-struct sigaction {
+-      __sighandler_t  sa_handler;
+-      unsigned long   sa_flags;
+-      void            (*sa_restorer)(void);   /* Not used by Linux/SPARC */
+-      sigset_t        sa_mask;
+-};
+-
+ /* Not actually used by the kernel... */
+ #define SA_RESTORER   0x80000000
index 13fe8a2..31c4fbc 100644 (file)
@@ -1,4 +1,4 @@
 require klibc_1.5.15.inc
-PR = "r2"
+PR = "r3"
 
 KLIBC_FETCHDIR = "Testing"
index 89378b7..f6f5b87 100644 (file)
@@ -2,6 +2,8 @@ require klibc-common.inc
 
 SRC_URI += "file://staging.patch;patch=1 \
            file://klibc_kexecsyscall.patch;patch=1 \
+           file://mntproc-definitions.patch;patch=1 \
+           file://signal-cleanup.patch;patch=1 \
            "
 
 # we want only the shared programms and the lib so we chose them manually