aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/klibc
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2010-05-31 01:39:00 +0200
committerAndrea Adami <andrea.adami@gmail.com>2010-05-31 01:39:00 +0200
commit921f2ae278c952cf30cfe1554bac079c213bd5f1 (patch)
treedfc5ea4458d06929c52edf97e18cb4d1cd1d12fc /recipes/klibc
parentc6a662cd60d585a10b83a3642de36b48bb15e5ac (diff)
downloadopenembedded-921f2ae278c952cf30cfe1554bac079c213bd5f1.tar.gz
klibc: add some patches to 1.5.18 and make it build vs. old kernels.
* increase default preference, tested on arm
Diffstat (limited to 'recipes/klibc')
-rw-r--r--recipes/klibc/klibc-1.5.18/arm-signal-cleanup.patch18
-rw-r--r--recipes/klibc/klibc-1.5.18/socket.h.patch160
-rw-r--r--recipes/klibc/klibc_1.5.18.bb2
-rw-r--r--recipes/klibc/klibc_1.5.18.inc4
4 files changed, 182 insertions, 2 deletions
diff --git a/recipes/klibc/klibc-1.5.18/arm-signal-cleanup.patch b/recipes/klibc/klibc-1.5.18/arm-signal-cleanup.patch
new file mode 100644
index 0000000000..b95d6aec95
--- /dev/null
+++ b/recipes/klibc/klibc-1.5.18/arm-signal-cleanup.patch
@@ -0,0 +1,18 @@
+Index: klibc-1.5.15/usr/include/arch/arm/klibc/archsignal.h
+===================================================================
+--- klibc-1.5.15.orig/usr/include/arch/arm/klibc/archsignal.h 2010-03-20 01:06:35.000000000 +0100
++++ klibc-1.5.15/usr/include/arch/arm/klibc/archsignal.h 2010-05-30 18:08:47.000000000 +0200
+@@ -104,7 +104,12 @@
+ #define MINSIGSTKSZ 2048
+ #define SIGSTKSZ 8192
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ #include <asm-generic/signal-defs.h>
++#else
++#include <asm-generic/signal.h>
++#endif
+
+ /* This uses gcc anonymous union support... */
+ struct siginfo;
+
diff --git a/recipes/klibc/klibc-1.5.18/socket.h.patch b/recipes/klibc/klibc-1.5.18/socket.h.patch
new file mode 100644
index 0000000000..71c93729d8
--- /dev/null
+++ b/recipes/klibc/klibc-1.5.18/socket.h.patch
@@ -0,0 +1,160 @@
+upstream: http://www.zytor.com/pipermail/klibc/2010-February/002486.html,http://www.zytor.com/pipermail/klibc/2010-February/002487.html,http://www.zytor.com/pipermail/klibc/2010-February/002488.html
+status: pending
+comment: squashed 3 commits togheter
+
+Subject: Add relevant socket.h definitions
+From: maximilian attems <max@stro.at>
+Date: Tue Feb 23 06:02:42 PST 2010
+
+
+linux-2.6 9c501935a3cdcf6b1d35aaee3aa11c7a7051a305 cleaned
+<linux/socket.h> from allmost any userspace export.
+
+thus define the stuff that used to be there in klibc socket.h
+
+Signed-off-by: maximilian attems <max@stro.at>
+
+Modified for compatibility with pre 2.6.33 kernels in OpenEmbedded
+---
+Index: klibc-1.5.16/usr/include/sys/socket.h
+===================================================================
+--- a/usr/include/sys/socket.h 2010-03-13 22:33:51.000000000 +0100
++++ b/usr/include/sys/socket.h 2010-05-31 00:44:16.000000000 +0200
+@@ -9,6 +9,14 @@
+ #include <klibc/compiler.h>
+ #include <klibc/sysconfig.h>
+ #include <linux/socket.h>
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++#include <linux/sockios.h> /* the SIOCxxx I/O controls */
++#include <linux/uio.h> /* iovec support */
++#include <asm/socket.h> /* arch-dependent defines */
++#endif
++
+ #include <linux/uio.h>
+ #include <asm/socket.h>
+ #if _KLIBC_HAS_ARCHSOCKET_H
+@@ -29,6 +37,8 @@
+ # define SOCK_PACKET 10
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++
+ #ifndef AF_INET
+ #define AF_UNSPEC 0
+ #define AF_UNIX 1 /* Unix domain sockets */
+@@ -148,7 +158,12 @@
+ sa_family_t sa_family; /* address family, AF_xxx */
+ char sa_data[14]; /* 14 bytes of protocol address */
+ };
++
++#endif
++
+ typedef int socklen_t;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+ struct msghdr {
+ void *msg_name;
+ int msg_namelen;
+@@ -158,7 +173,7 @@
+ size_t msg_controllen;
+ unsigned msg_flags;
+ };
+-
++#endif
+
+ __extern int socket(int, int, int);
+ __extern int bind(int, struct sockaddr *, int);
+Index: klibc-1.5.16/usr/kinit/nfsmount/nfsmount.h
+===================================================================
+--- a/usr/kinit/nfsmount/nfsmount.h 2009-01-04 20:28:03.000000000 +0100
++++ b/usr/kinit/nfsmount/nfsmount.h 2010-05-30 23:00:36.000000000 +0200
+@@ -3,6 +3,12 @@
+
+ #include <linux/nfs_mount.h>
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++#define MNTPROC_MNT 1
++#define MNTPROC_UMNT 3
++#endif
++
+ extern int nfs_port;
+
+ extern int nfsmount_main(int argc, char *argv[]);
+Index: klibc-1.5.16/usr/kinit/nfsmount/dummypmap.c
+===================================================================
+--- a/usr/kinit/nfsmount/dummypmap.c 2009-01-04 20:28:03.000000000 +0100
++++ b/usr/kinit/nfsmount/dummypmap.c 2010-05-30 23:08:29.000000000 +0200
+@@ -39,7 +39,12 @@
+
+ static int bind_portmap(void)
+ {
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++ int sock = socket(AF_INET, SOCK_DGRAM, 0);
++#else
+ int sock = socket(PF_INET, SOCK_DGRAM, 0);
++#endif
+ struct sockaddr_in sin;
+
+ if (sock < 0)
+Index: klibc-1.5.16/usr/kinit/nfsmount/mount.c
+===================================================================
+--- a/usr/kinit/nfsmount/mount.c 2010-05-30 22:30:26.000000000 +0200
++++ b/usr/kinit/nfsmount/mount.c 2010-05-30 23:13:15.000000000 +0200
+@@ -294,11 +294,21 @@
+ }
+ mounted = 1;
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++ if (data->flags & NFS_MOUNT_TCP) {
++ sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
++ } else {
++ sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
++ }
++#else
+ if (data->flags & NFS_MOUNT_TCP) {
+ sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ } else {
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ }
++#endif
++
+
+ if (sock == -1) {
+ perror("socket");
+Index: klibc-1.5.16/usr/kinit/nfsmount/sunrpc.c
+===================================================================
+--- a/usr/kinit/nfsmount/sunrpc.c 2009-01-04 20:28:03.000000000 +0100
++++ b/usr/kinit/nfsmount/sunrpc.c 2010-05-30 23:11:12.000000000 +0200
+@@ -152,7 +152,12 @@
+
+ memset(clnt, 0, sizeof(clnt));
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++ if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
++#else
+ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
++#endif
+ perror("socket");
+ goto bail;
+ }
+@@ -197,7 +202,12 @@
+
+ memset(clnt, 0, sizeof(clnt));
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++ if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
++#else
+ if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
++#endif
+ perror("socket");
+ goto bail;
+ }
+--
+1.6.6.1
diff --git a/recipes/klibc/klibc_1.5.18.bb b/recipes/klibc/klibc_1.5.18.bb
index 4b299f226e..694bf5849b 100644
--- a/recipes/klibc/klibc_1.5.18.bb
+++ b/recipes/klibc/klibc_1.5.18.bb
@@ -1,3 +1,3 @@
require klibc.inc
require klibc_${PV}.inc
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
diff --git a/recipes/klibc/klibc_1.5.18.inc b/recipes/klibc/klibc_1.5.18.inc
index c426b066c1..c03aad48bc 100644
--- a/recipes/klibc/klibc_1.5.18.inc
+++ b/recipes/klibc/klibc_1.5.18.inc
@@ -7,10 +7,12 @@ SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch \
file://staging.patch \
file://klibc_kexecsyscall.patch \
file://mntproc-definitions.patch \
+ file://arm-signal-cleanup.patch \
+ file://socket.h.patch \
file://isystem.patch \
"
-DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE = "1"
KLIBC_FETCHDIR = "1.5"